Skip to content

NoneType object has no attribute 'replace' when text_to_image/train_text_to_image_lora save save_attn_procs #2616

Description

@better629

Describe the bug

inside examples/text_to_image/train_text_to_image_lora.py

        unet = unet.to(torch.float32)
        unet.save_attn_procs(args.output_dir)

use save_attn_procs but the weights_name is None which cause the problem in
https://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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstaleIssues that haven't received updates

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions