Skip to content
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

error when using locon and lora together #2

Closed
wansf3 opened this issue Mar 3, 2023 · 2 comments
Closed

error when using locon and lora together #2

wansf3 opened this issue Mar 3, 2023 · 2 comments

Comments

@wansf3
Copy link

wansf3 commented Mar 3, 2023

Error running process_batch: D:\stable-diffusion-webui\stable-diffusion-webuiLORA\extensions\sd-webui-additional-networks\scripts\additional_networks.py
Traceback (most recent call last):
File "D:\stable-diffusion-webui\stable-diffusion-webuiLORA\modules\scripts.py", line 395, in process_batch
script.process_batch(p, *script_args, **kwargs)
File "D:\stable-diffusion-webui\stable-diffusion-webuiLORA\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 209, in process_batch
network, info = lora_compvis.create_network_and_apply_compvis(du_state_dict, weight_tenc, weight_unet, text_encoder, unet)
File "D:\stable-diffusion-webui\stable-diffusion-webuiLORA\extensions\a1111-sd-webui-locon\locon_compvis.py", line 62, in create_network_and_apply_compvis
network = LoConNetworkCompvis(
File "D:\stable-diffusion-webui\stable-diffusion-webuiLORA\extensions\a1111-sd-webui-locon\locon_compvis.py", line 289, in init
self.text_encoder_loras, te_rep_modules = create_modules(
File "D:\stable-diffusion-webui\stable-diffusion-webuiLORA\extensions\a1111-sd-webui-locon\locon_compvis.py", line 266, in create_modules
alpha = comp_state_dict[f'{lora_name}.alpha'].item()
KeyError: 'lora_te_wrapped_transformer_text_model_encoder_layers_0_self_attn_k_proj.alpha'

it wont stop generation but completely ignore other loras ,

@KohakuBlueleaf
Copy link
Owner

Should be solved
Plz check

@wansf3
Copy link
Author

wansf3 commented Mar 4, 2023

fix confirmed , thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants