We describe the spin-dependent quantum conductance in a wire where a magnetic field is spatially modulated. The change in direction and intensity of the magnetic field acts as a perturbation that mixes spin projections. This is exemplified by a ferromagnetic nanowire. There the local field varies smoothly its direction generating a domain wall (DW) as described by the well-known Cabrera-Falicov model. Here, we generalize this model to include also a strength modulation. We identify two striking diabatic regimes that appear when such magnetic inhogeneity occurs. 1) If the field strength at the DW is weak enough, the local Zeeman energies result in an avoided crossing. Thus, the spin-flip probability follows the Landau-Zener formula. 2) For strong fields, the spin-dependent conductance shows oscillations as a function of the DW width. We interpret them in terms of Rabi oscillations. Time and length scales obtained from this simplified view show an excellent agreement with the exact dynamical solution of the spin-dependent transport. These results remain valid for other situations involving modulated magnetic structures and thus they open new prospects for the use of quantum interferences in spin-based devices.This paper is dedicated to the memory of the lifelong collaborator Patricia Rebeca Levstein.