lora-training icon indicating copy to clipboard operation
lora-training copied to clipboard

Error using Lora in Automatic1111 installation

Open jamesblackwell opened this issue 2 years ago • 6 comments

I trained a Lora on replicate.com and then uploaded the resulting file to my automatic1111 installation.

I get this error, though:

Total progress: 70it [00:23,  2.99it/s]
2023-04-06T13:48:41.986335742Z activating extra network lora with arguments [<modules.extra_networks.ExtraNetworkParams object at 0x7f126a2b8040>]: ValueError
2023-04-06T13:48:41.986402264Z Traceback (most recent call last):
2023-04-06T13:48:41.986441905Z   File "/workspace/stable-diffusion-webui/modules/extra_networks.py", line 75, in activate
2023-04-06T13:48:41.986455875Z     extra_network.activate(p, extra_network_args)
2023-04-06T13:48:41.986461066Z   File "/workspace/stable-diffusion-webui/extensions-builtin/Lora/extra_networks_lora.py", line 23, in activate
2023-04-06T13:48:41.986465546Z     lora.load_loras(names, multipliers)
2023-04-06T13:48:41.986469316Z   File "/workspace/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 214, in load_loras
2023-04-06T13:48:41.986473666Z     lora = load_lora(name, lora_on_disk.filename)
2023-04-06T13:48:41.986477856Z   File "/workspace/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 139, in load_lora
2023-04-06T13:48:41.986481906Z     key_diffusers_without_lora_parts, lora_key = key_diffusers.split(".", 1)
2023-04-06T13:48:41.986485966Z ValueError: not enough values to unpack (expected 2, got 1)

Any ideas? Loras downloaded from civitai etc work fine

jamesblackwell avatar Apr 06 '23 14:04 jamesblackwell

The exact same thing happens to me, I get the same error using the lora file in the Automatic1111

AlbertdeFox avatar Apr 13 '23 13:04 AlbertdeFox

yep me too

jonwong666 avatar Apr 17 '23 03:04 jonwong666

This also seems to be a duplicate of #11

danstis avatar May 01 '23 01:05 danstis

Version 0.17 of the diffusers library now handle the A1111 / kohya_ss LoRA format. That should help updating this cog? https://github.com/huggingface/diffusers/releases/tag/v0.17.0

lionel-alves avatar Jun 08 '23 16:06 lionel-alves

@cloneofsimo @jamesblackwell any idea how this can be moved forward?

seems like an update to 0.17 of diffusers would handle that gracefully.

xpluscal avatar Jun 10 '23 07:06 xpluscal

Bump

feliks912 avatar Dec 27 '23 01:12 feliks912