You can max Affction before, while evolving, after you have done it. The 2x Bonus will always trigger.
But still you should start with that before evolving, since the affection Bonus is a big + in Stats along with the fast first 40 levels. The new/enhanced Ability does only really make a difference at 5* or 6*, sure some exeptions here and there but still.