error while using lora_add to create a ckpt file
What happened? I download lora_illust.pt from (https://huggingface.co/spaces/lora-library/Low-rank-Adaptation/blob/main/lora_illust.pt) And run lora_add --path_1 stabilityai/stable-diffusion-2-base --path_2 lora_illust.pt --mode upl-ckpt-v2 --alpha 1.0 --output_path merged_model.ckpt
Then got the following error:
Traceback (most recent call last): File "/root/miniconda/bin/lora_add", line 8, in <module> sys.exit(main()) File "/root/miniconda/lib/python3.10/site-packages/lora_diffusion/cli_lora_add.py", line 118, in main fire.Fire(add) File "/root/miniconda/lib/python3.10/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/root/miniconda/lib/python3.10/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/root/miniconda/lib/python3.10/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/root/miniconda/lib/python3.10/site-packages/lora_diffusion/cli_lora_add.py", line 78, in add weight_apply_lora(loaded_pipeline.unet, torch.load(path_2), alpha=alpha) File "/root/miniconda/lib/python3.10/site-packages/lora_diffusion/lora.py", line 423, in weight_apply_lora weight = weight + alpha * (up_weight @ down_weight).type(weight.dtype) RuntimeError: The size of tensor a (2560) must match the size of tensor b (320) at non-singleton dimension 0
What was expected? A CKPT file to be generated for stable-diffusion-2-base and lora_illust.pt
Thank you.
#140 Should be dealt with this update. Please wait for the next release, or use dev branch!