-
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
NoneType object has no attribute 'replace' when text_to_image/train_text_to_image_lora save save_attn_procs #2616
Comments
Hey @better629, Could you please provide a reproducible code snippet? |
Also cc @sayakpaul for train text to lora training script |
just run |
This is the same issue as #2548. The PR #2448 introduced a regression when saving with the Since the check for diffusers/src/diffusers/loaders.py Lines 277 to 281 in 2ea1da8
is after the code for cleaning the folder from a previous save diffusers/src/diffusers/loaders.py Line 273 in 2ea1da8
The script will throw the following exception:
Temporary workaround for now is to save and load as follows: # save
unet.save_attn_procs(args.output_dir, weights_name="pytorch_lora_weights.bin")
# load
unet.load_attn_procs(args.output_dir, weight_name="pytorch_lora_weights.bin")
|
Thanks for investigating @wfng92! Would you like to contribute a PR? Pinging @wangjuns as well because of #2548 (comment). |
Hi, I believe it is better for the There need to be better way to integrate
A few possible scenarios: no
installed
Also, it might be better to standardize the naming for # save
unet.save_attn_procs(args.output_dir, weights_name="pytorch_lora_weights.bin")
# load
unet.load_attn_procs(args.output_dir, weight_name="pytorch_lora_weights.bin") |
Thanks a mille for the nice summary here @better629 ! I think #2655 should fix everything - could you give it a try? :-) |
@patrickvonplaten Yes, Thank You! |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Describe the bug
inside
examples/text_to_image/train_text_to_image_lora.py
use
save_attn_procs
but theweights_name
is None which cause the problem inhttps://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders.py#L269-L274
Reproduction
Logs
No response
System Info
Ubuntu 20.04
Nvidia GTX 3090
CUDA Version: 11.7
Torch: 1.13.1
Diffusers: 0.15.0.dev0
deepspeed: 0.8.1
xformers: 0.0.17.dev466
accelerate: 0.16.0
The text was updated successfully, but these errors were encountered: