Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error training on SDXL 1.0 via Shivram's colab #258

Open
mahaboobkhan29 opened this issue May 8, 2024 · 1 comment
Open

Error training on SDXL 1.0 via Shivram's colab #258

mahaboobkhan29 opened this issue May 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mahaboobkhan29
Copy link

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

@mahaboobkhan29 mahaboobkhan29 added the bug Something isn't working label May 8, 2024
@mahaboobkhan29
Copy link
Author

@ShivamShrirao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant