brkirch / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
195 stars 10 forks source link

[Bug]: KeyError: 'trunk_conv.weight' #10

Closed shelly-luo closed 1 year ago

shelly-luo commented 1 year ago

Is there an existing issue for this?

What happened?

I put SwinIR_4x.pth into the stable-diffusive-webui /models/ESRGAN folder and it doesn't seem to work.

Steps to reproduce the problem

I don't know

What should have happened?

I don't know

Commit where the problem happens

KeyError: 'trunk_conv.weight' Time taken: 1m 0.09s

What platforms do you use to access the UI ?

MacOS

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

no

List of extensions

Extension URL Version Update
Stable-Diffusion-Webui-Civitai-Helper https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper.git fcf5a27a (Fri Apr 14 05:39:01 2023) unknown
a1111-sd-webui-tagcomplete https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git d1357cdd (Sat Apr 15 11:25:07 2023) unknown
openpose-editor https://github.com/fkunn1326/openpose-editor.git 0b10737e (Wed Apr 12 10:20:59 2023) unknown
posex https://github.com/hnmr293/posex.git 61169d30 (Sat Apr 1 12:28:38 2023) unknown
sd-dynamic-thresholding https://github.com/mcmonkeyprojects/sd-dynamic-thresholding.git 5d3465c4 (Wed Apr 12 12:39:43 2023) unknown
sd-webui-additional-networks https://github.com/kohya-ss/sd-webui-additional-networks.git d944d428 (Thu Apr 6 10:42:19 2023) unknown
sd-webui-controlnet      
sd-webui-cutoff https://github.com/hnmr293/sd-webui-cutoff.git 89b90487 (Wed Mar 22 15:47:20 2023) unknown
sd-webui-llul https://github.com/hnmr293/sd-webui-llul.git 9123f098 (Sat Apr 1 12:52:42 2023) unknown
stable-diffusion-webui-dataset-tag-editor https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor.git c1c78f59 (Sun Apr 2 11:15:32 2023) unknown
stable-diffusion-webui-localization-zh_CN https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git 582ca24d (Thu Mar 30 07:06:14 2023) unknown
stable-diffusion-webui-wildcards https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards.git 6ed81ed1 (Sat Oct 29 16:18:48 2022) unknown

Console logs

To create a public link, set `share=True` in `launch()`.
Startup time: 1.0s (list extensions: 0.5s, load scripts: 0.3s, create ui: 0.1s).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:56<00:00,  2.83s/it]
Error completing request██████████████████▌     | 24/30 [21:40<00:18,  3.03s/it]
Arguments: ('task(dm7irrnphn0vbnb)', 'masterpiece, best quality, 1girl, solo, long_hair, looking_at_viewer, white hair, red eyes, smile, bangs, skirt, shirt, long_sleeves, hat, dress, bow, holding, closed_mouth, flower, frills, hair_flower, petals, bouquet, holding_flower, center_frills, bonnet, holding_bouquet, tachi-e, full body, white background,  <lora:standingFullBodyWithBackgroundStyle_v10Offset:1>', 'EasyNegative,', [], 20, 16, False, False, 1, 1, 7, 515979332.0, -1.0, 0, 0, 0, False, 768, 512, True, 0.5, 2.5, 'SwinIR_4x', 10, 0, 0, ['Negative guidance minimum sigma: 0.0'], 0, False, '', 0, False, 7, 100, 'Constant', 0, 'Constant', 0, 4, False, False, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, None, 'Refresh models', <scripts.external_code.ControlNetUnit object at 0x2a3a6f850>, False, '', 0.5, True, False, '', 'Lerp', False, False, 1, 0.15, False, 'OUT', ['OUT'], 5, 0, 'Bilinear', False, 'Pooling Max', False, 'Lerp', '', '', False, False, False, 'positive', 'comma', 0, False, False, '', 1, '', 0, '', 0, '', True, False, False, False, 0, None, False, 50) {}
Traceback (most recent call last):
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/processing.py", line 519, in process_images
    res = process_images_inner(p)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/processing.py", line 674, in process_images_inner
    samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength, prompts=prompts)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/processing.py", line 934, in sample
    image = images.resize_image(0, image, target_width, target_height, upscaler_name=self.hr_upscaler)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/images.py", line 275, in resize_image
    res = resize(im, width, height)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/images.py", line 267, in resize
    im = upscaler.scaler.upscale(im, scale, upscaler.data_path)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/upscaler.py", line 63, in upscale
    img = self.do_upscale(img, selected_model)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/esrgan_model.py", line 150, in do_upscale
    model = self.load_model(selected_model)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/esrgan_model.py", line 184, in load_model
    state_dict = mod2normal(state_dict)
  File "/Users/shelly/Documents/stable-diffusion-webui/modules/esrgan_model.py", line 36, in mod2normal
    crt_net['model.1.sub.23.weight'] = state_dict['trunk_conv.weight']
KeyError: 'trunk_conv.weight'

Additional information

No response