kohya-ss / sd-webui-additional-networks

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

AttributeError: 'list' object has no attribute 'items' #70

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi,

After training with lora and wanting to use my .pt file I get the following message:

LoRA weight: 1, model: test_1000(61a77e3f) Error running process: C:\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py Traceback (most recent call last): File "C:\stable-diffusion-webui\modules\scripts.py", line 357, in process script.process(p, *script_args) File "C:\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 238, in process network, info = lora_compvis.create_network_and_apply_compvis(du_state_dict, weight, text_encoder, unet) File "C:\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\lora_compvis.py", line 83, in create_network_and_apply_compvis for key, value in du_state_dict.items(): AttributeError: 'list' object has no attribute 'items'

The commits: Dreambooth revision: 9f4d931a319056c537d24669cb950d146d1537b0 SD-WebUI revision: 91c8d0dcfc9a5d46aec47fd3eb34c633c104b5bb SD-WebUI-additional-networks: 4e383e250fda9e890c4466fe4664fa86e1153c1c

Can you help me?

0217ljh commented 1 year ago

me too,I got a totally same wrong.

LoRA weight: 0.4, model: test6_600(54d1212128b3) Error running process: D:\AI_pic\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py Traceback (most recent call last): File "D:\AI_pic\stable-diffusion-webui\modules\scripts.py", line 386, in process script.process(p, *script_args) File "D:\AI_pic\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 535, in process network, info = lora_compvis.create_network_and_apply_compvis(du_state_dict, weight, text_encoder, unet) File "D:\AI_pic\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\lora_compvis.py", line 84, in create_network_and_apply_compvis for key, value in du_state_dict.items(): AttributeError: 'list' object has no attribute 'items'

dreambooth is an old revision SD-WebUI revision: 91c8d0dcfc9a5d46aec47fd3eb34c633c104b5bb additional-networks:4e383e2

ghost commented 1 year ago

@0217ljh I found the issue, you need to use https://github.com/kohya-ss/sd-scripts and not the Dreambooth lora trainer inside automatic1111