ShivamShrirao / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch
https://huggingface.co/docs/diffusers
Apache License 2.0
1.89k stars 505 forks source link

missing some values in model which is created by train_dreambooth.py #173

Open log901108 opened 1 year ago

log901108 commented 1 year ago

Describe the bug

I want to use img2img for dreambooth trained model. It works fine when do inference by the model created, however the model created by train_dreambooth.py gives error when StableDiffusionImg2ImgPipeline with some missing values. I already read some others issues who suffer similar error, however there is no way to fix it.

Reproduction

create model by using train_dreambooth.py, then use it as pretrained_model for img2img

Logs

ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.StableDiffusionImg2ImgPipeline'> expected {'scheduler', 'text_encoder', 'feature_extractor', 'tokenizer', 'safety_checker', 'unet', 'vae'}, but only {'scheduler', 'text_encoder', 'tokenizer', 'unet', 'vae'} were passed.
Traceback (most recent call last):

System Info

python 3.9, ubuntu 20.04LTS,

cuda 11.7