ABSTRACT We compute the evolution of the grain size distribution (GSD) in a suite of numerical simulations of an isolated Milky Way-like galaxy using the N-body/smoothed-particle-hydrodynamics code gadget4-osaka. The full GSD is sampled on a logarithmically spaced grid with 30 bins, and its evolution is calculated self-consistently with the hydrodynamical and chemical evolution of the galaxy using a state-of-the-art star formation and feedback model. In previous versions of this model, the GSD tended to be slightly biased towards larger grains and the extinction curve had a tendency to be flatter than the observations. This work addresses these issues by considering the diffusion of dust and metals through turbulence on subgrid scales and introducing a multiphase subgrid model that enables a smoother transition from diffuse to dense gas. We show that diffusion can significantly enhance the production of small grains and improve the agreement with the observed dust extinction curve in the Milky Way.