AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.15k stars 26.41k forks source link

KeyError: 'model.6.weight' #319

Closed GalaxyTimeMachine closed 1 year ago

GalaxyTimeMachine commented 1 year ago

I get this error every time I launch the server:

Launching webui.py...
Error loading ESRGAN model: F:\stable-diffusion-webui\ESRGAN\2xESRGAN.pth
Traceback (most recent call last):
  File "F:\stable-diffusion-webui\modules\esrgan_model.py", line 138, in load_models
    modules.shared.sd_upscalers.append(UpscalerESRGAN(path, model_name))
  File "F:\stable-diffusion-webui\modules\esrgan_model.py", line 121, in __init__
    self.model = load_model(filename)
  File "F:\stable-diffusion-webui\modules\esrgan_model.py", line 68, in load_model
    crt_net['upconv2.weight'] = pretrained_net['model.6.weight']
KeyError: 'model.6.weight'

Everything seems to work fine when it's running, but am I missing something due to this error?

GalaxyTimeMachine commented 1 year ago

This is clearly something to do with the ESRGAN models I downloaded. Is there any advantage to using these over real-ESRGAN?

AUTOMATIC1111 commented 1 year ago

please consult the readme

C43H66N12O12S2 commented 1 year ago

%99 an esrgan variant model - we don't support those. if it is actually ESRGAN and not ESRGAN+, BSRGAN or SPSR, reopen.