first off, thanks for actually adding the much requested option to upgrade the number of people in a unit when higher numbers become available.
The upgrade cost is a bit of a problem, however. I'm aware that this is probably a work in progress, but just in case it's actally an oversight - the cost seems to be static (15g/person) and not linked to the actual values of the unit.
this is not a big issue if you upgrade your starting spearmen to size 4 or something, but in the late game, you can explot the mechanic by intentionally training expensive (production/metal/crystal) units at group size 3 instead of your maximum troop size. this way, you caneasily save several turns of construction and a ton of crystal/metal. when the unit is trained, just hit the upgrade button and for a mere 15g/person you get 1/2/3 extra guys using the same expensive training and equipment as the rest of the unit.
i just tested this with endgame stuff, created some silly uber unit with full champion plate armor, doom maul and magical trinkets. the design costs something around 70 crystal and 200 production. i built a squad of 3 of those guys and upgraded them to size 6 for 45g. so in this silly example, the 45g bought me about 210 crystal and 600 production worth of fighting power.
i believe that mechanic needs some adjustment 