Like @iAM said, one week, unless you get its friendship meter maxed out. Then it'll stay longer, but IDK how long that is as I haven't managed to pull that off yet.
As far as I can understand, they will stay as long as you want as long as you don't make the album with max friendship. And of course if you don't let them die, too.