The generation of magnetic fields is a natural consequence of the existence of vortical currents in the pre-recombination era. This has been confirmed in detail for the case of adiabatic initial conditions, using second-order Boltzmann solvers, but has not been fully explored in the presence of isocurvatures. In this work, we use a modified version of the second-order Boltzmann code SONG to compute the magnetic field generated by vortical currents for general initial conditions. A mild enhancement of the generated magnetic field is found in the presence of general isocurvature modes, when compared to the adiabatic case. A particularly interesting case is that of the compensated isocurvature mode, for which the enhancement increases by several orders of magnitude due to the observationally allowed large amplitude of those modes. We show in this particular case how these compensated modes can influence observables at second order, such as the magnetic fields, and produce interesting effects which may be used to constrain these modes in the future.