We explore the role of the spin diffusion of conducting electrons in two-dimensional magnetic textures (domain walls and skyrmions) with spatial variation of the order of the spin precession length λex. The effect of diffusion reflects in four additional torques that are third order in spatial derivatives of magnetization and bilinear in λex and in the nonadiabatic parameter β′. In order to study the dynamics of the solitons when these diffusive torques are present, we derive the Thiele equation in the limit of steady motion and we compare the results with the nondiffusive limit. When considering a homogenous current these torques increase the longitudinal velocity of transverse domain walls of width Δ by a factor (λex/Δ)2(α/3), α being the magnetic damping constant. In the case of single skyrmions with core radius r0 these new contributions tend to increase the Magnus effect in an amount proportional to (λex/r0)2(1+2αβ′).