kohya-ss / sd-webui-additional-networks

GNU Affero General Public License v3.0
1.77k stars 296 forks source link

wire issue need help 'AssertionError: conversion failed: lora_unet_conv_in. the model may not be trained by `sd-scripts`.' #241

Open napoleonchn opened 8 months ago

napoleonchn commented 8 months ago

I encounter a wire issue, could not launch XYZ plot correctly, LORA don't work, all the image are the same, it shows, can anyone help me slove it? LoRA weight_unet: 1, weight_tenc: 1, model: JiaQi_v3-000002(8cc5fdb62fe2) dimension: {128, 64}, alpha: {64.0, 32.0}, multiplier_unet: 1, multiplier_tenc: 1 Error running process_batch: G:\sd-webui-aki-v4.2\extensions\sd-webui-additional-networks\scripts\additional_networks.py Traceback (most recent call last): File "G:\sd-webui-aki-v4.2\modules\scripts.py", line 742, in process_batch script.process_batch(p, script_args, kwargs) File "G:\sd-webui-aki-v4.2\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 244, in process_batch network, info = lora_compvis.create_network_and_apply_compvis( File "G:\sd-webui-aki-v4.2\extensions\sd-webui-additional-networks\scripts\lora_compvis.py", line 153, in create_network_and_apply_compvis network = LoRANetworkCompvis(text_encoder, unet, multiplier_tenc, multiplier_unet, modules_dim, modules_alpha) File "G:\sd-webui-aki-v4.2\extensions\sd-webui-additional-networks\scripts\lora_compvis.py", line 341, in init comp_vis_lora_name = LoRANetworkCompvis.convert_diffusers_name_to_compvis(self.v2, du_lora_name) File "G:\sd-webui-aki-v4.2\extensions\sd-webui-additional-networks\scripts\lora_compvis.py", line 302, in convert_diffusers_name_to_compvis assert cv_name is not None, f"conversion failed: {du_name}. the model may not be trained by sd-scripts." AssertionError: conversion failed: lora_unet_conv_in. the model may not be trained by sd-scripts.

jayododds commented 7 months ago

also getting this on self trained loras. I'll try some Civitai downloads to confirm

jayododds commented 7 months ago

Civitai downloads seem to work for me - so it would seem there is something in the LORAs that I have created that is causing the issue. Likely a meta data issue or something of that nature - I'm looking into it. I'll let you know if I find anything that might help @napoleonchn, but don't hold your breath :)

ToolB0xx commented 7 months ago

any solution? getting this on all my trained loras

jayododds commented 7 months ago

Hey @ToolB0xx and @napoleonchn what are you training your models in? I had a couple that were trained on a mac with Draw Things - which work fine elsewhere but don't seem to work with this extension at all. I did a couple of new trainings with Kohya and they seem to work flawlessly. I think it comes down to what data is being saved in the .safetensor.