You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I'm a beginner programmer and have spent the past few days browsing stackoverflow and the relevant communities, but couldn't find the solution to my problem. Would appreciate if anyone has any insight to the following.
AttributeError: 'UNet2DConditionModel' object has no attribute 'add_embedding'. Did you mean: 'class_embedding'?
I tried various solutions like updating my python and changing to a different diffuser version, but still encountered the error above. It seems i'd have to dig into the source code, but as a beginner programmer I have barely any idea what I'm doing. Again, would appreciate if anyone has any idea or point me to the correct repo.
Describe the bug
Hi all, I'm a beginner programmer and have spent the past few days browsing stackoverflow and the relevant communities, but couldn't find the solution to my problem. Would appreciate if anyone has any insight to the following.
I am trying to train my dreambooth using the colab: https://colab.research.google.com/github/ShivamShrirao/diffusers/blob/main/examples/dreambooth/DreamBooth_Stable_Diffusion.ipynb
But when tried to train on stabilityai/stable-diffusion-xl-base-1.0 and default settings, I encountered:
Revision Not Found for url: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/fp16/model_index.json. Invalid rev id: fp16
So I removed fp16 and then encountered:
AttributeError: 'UNet2DConditionModel' object has no attribute 'add_embedding'. Did you mean: 'class_embedding'?
I tried various solutions like updating my python and changing to a different diffuser version, but still encountered the error above. It seems i'd have to dig into the source code, but as a beginner programmer I have barely any idea what I'm doing. Again, would appreciate if anyone has any idea or point me to the correct repo.
Reproduction
I JUST REMOVED REVISION
!python3 train_dreambooth.py
--pretrained_model_name_or_path=$MODEL_NAME
--pretrained_vae_name_or_path="stabilityai/sd-vae-ft-mse"
--output_dir=$OUTPUT_DIR
--with_prior_preservation --prior_loss_weight=1.0
--seed=1337
--resolution=512
--train_batch_size=1
--train_text_encoder
--mixed_precision="fp16"
--use_8bit_adam
--gradient_accumulation_steps=1
--learning_rate=1e-6
--lr_scheduler="constant"
--lr_warmup_steps=0
--num_class_images=50
--sample_batch_size=4
--max_train_steps=1000
--save_interval=10000
--save_sample_prompt="photo of zwx dog"
--concepts_list="concepts_list.json"
Logs
No response
System Info
!wget -q https://github.com/ShivamShrirao/diffusers/raw/main/examples/dreambooth/train_dreambooth.py
!wget -q https://github.com/ShivamShrirao/diffusers/raw/main/scripts/convert_diffusers_to_original_stable_diffusion.py
%pip install git+https://github.com/ShivamShrirao/diffusers
%pip install -U --pre triton
%pip install transformers ftfy bitsandbytes gradio natsort safetensors xformers torch==2.1.0+cu121 accelerate
The text was updated successfully, but these errors were encountered: