  Primordial magnetic fields of cosmologically interesting field strengths can
be generated from gravitationally coupled electrodynamics during inflation. As
the cosmological constraints require this to be power law inflation it is not
possible to generate at the same time the curvature perturbation from
inflation. Therefore here a completion is considered whereby the large scale
magnetic field is generated during inflation and the primordial curvature mode
in a subsequent era from a curvaton field. It is found that constraints on the
model to obtain strong magnetic fields and those to suppress the amplitude of
the curvature perturbation generated during inflation can be simultaneously
satisfied for magnetic seed fields $B_s\stackrel{>}{\sim}10^{-30}$ G.
