A torque formula for non-isothermal Type I planetary migration – II. Effects of diffusion