-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
AttributeError: 'NoneType' object has no attribute 'replace' #2669
Comments
Hey @killermyth, I sadly cannot reproduce the issue. Could it be that the PR: #2655 yesterday solves the issue? |
When I'm running the script above, the training works just fine |
thank u so much for you help! Model weights saved in /home/jovyan/lora/output-model/pytorch_lora_weights.bin |
The code for |
I pull the latest code and reinstall everything in a new machine, it's works! |
@killermyth Can you test your trained model using |
Just ran into the same issue. Updated: Finally I have looked into this issue. |
Sorry, but I have another question, does this |
Describe the bug
I follow train dreambooth lora model guid in https://github.com/huggingface/diffusers/tree/main/examples/dreambooth#training-with-low-rank-adaptation-of-large-language-models-lora
when I run accelerate launch train_dreambooth_lora.py, I got error like below
Steps: 100%|█████████████████████████████████████████| 500/500 [03:29<00:00, 3.37it/s, loss=0.178, lr=0.0001]Traceback (most recent call last):
File "/home/jovyan/lora/diffusers/examples/dreambooth/train_dreambooth_lora.py", line 1045, in
main(args)
File "/home/jovyan/lora/diffusers/examples/dreambooth/train_dreambooth_lora.py", line 995, in main
unet.save_attn_procs(args.output_dir)
File "/home/jovyan/lora/diffusers/src/diffusers/loaders.py", line 273, in save_attn_procs
weights_no_suffix = weights_name.replace(".bin", "")
AttributeError: 'NoneType' object has no attribute 'replace'
Reproduction
accelerate launch train_dreambooth_lora.py
--pretrained_model_name_or_path=$MODEL_NAME
--instance_data_dir=$INSTANCE_DIR
--output_dir=$OUTPUT_DIR
--instance_prompt="a photo of sks dog"
--resolution=512
--train_batch_size=1
--gradient_accumulation_steps=1
--checkpointing_steps=100
--learning_rate=1e-4
--report_to="wandb"
--lr_scheduler="constant"
--lr_warmup_steps=0
--max_train_steps=500
--validation_prompt="A photo of sks dog in a bucket"
--validation_epochs=50
--seed="0"
Logs
System Info
diffusers
version: 0.15.0.dev0The text was updated successfully, but these errors were encountered: