regular_diffusion source code for Mask based Refine Loss, aim to solve the fine-grained semantic errors in stable diffusion.