By strict RAW, the spell only affects evil clerics (granting the half-fiend template) and good clerics (half-celestial template instead) when normally cast. If you were to use the spell from a magic item, you could UMD it to benefit from it both ways, UMDing each use of a magic item as a different alignment to become both a half-fiend and half-celestial. I don't see why this wouldn't work, unless you also believe spells like energy immunity don't stack with each other when different castings use different elements. What I'm looking for is a way for a wizard incantatrix who has this spell via arcane disciple to reliably have both templates persisted, avoiding custom magic items.