stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

Failed to finetune the pre-trained model of 'stable-diffusion-v1-4' on image inpainting task

Open micklexqg opened this issue 4 months ago • 0 comments

I finetuned the pre-trained model of 'stable-diffusion-inpainting' on image inpainting task, and all work well as the model is trained on image inpainting. But when I finetuned with the pre-trained model of 'stable-diffusion-v1-4' which is trained on text-to-image, the loss is NaN and the result is pure black.

As the two models have different input channels for unet, I have changed the unet input channels of 'stable-diffusion-v1-4' to be fit for image inpainting task. So far, the code can run but the loss is NaN. I do not know where is the problem, how to finetune the pre-trained model of 'stable-diffusion-inpainting' on image inpainting task ? should I change some hyparameters? Any help will be appreciated, thanks!

micklexqg avatar Aug 17 '25 07:08 micklexqg