lora
lora copied to clipboard
RuntimeError: "addmm_impl_cpu_" not implemented for 'Half'
Hello. I am new in all this and i am not even sure if this is a bug or expected behavior... but I am getting this error "RuntimeError: "addmm_impl_cpu_" not implemented for 'Half'" in
lora_diffusion/lora.py", line 348, in weight_apply_lora
weight = weight + alpha * (up_weight @ down_weight).type(weight.dtype)
when merging the lora weight with runwayml/stable-diffusion-v1-5 on branch fp16 with mode upl-ckpt-v2 , it works fine on branch main (i assume because it doesn't use half floats?)
Hi, is your target unet on CUDA device?
I'll have a look, thank you for the issue!
Hi, is your target unet on CUDA device?
Sorry, i forgot to mention, i am using the lora_add cli and the issue is from this line here
https://github.com/cloneofsimo/lora/blob/c3bf2e46e74066318f283a1f709bd8b4c75b4720/lora_diffusion/cli_lora_add.py#L96
so i think, yes, the target is unet but on cpu
Ok, I think you would require them on GPU to get it work. At least I've tested them on GPUs only.
I get it to run by changing line 94 of cli_lora_add.py from ).to("cpu") to ).("cuda")