stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Error in Extra's upscaling with LDSR

Open elite4jonny opened this issue 3 years ago • 4 comments

When trying to upscale an image with LDSR the following error appears in the webgui: URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)>

The cmd prompt shows a longer error message:

Traceback (most recent call last): File "C:\Users\Default\stable-diffusion-webui\modules\ui.py", line 184, in f res = list(func(*args, **kwargs)) File "C:\Users\Default\stable-diffusion-webui\webui.py", line 64, in f res = func(*args, **kwargs) File "C:\Users\Default\stable-diffusion-webui\modules\extras.py", line 85, in run_extras res = upscale(image, extras_upscaler_1, upscaling_resize) File "C:\Users\Default\stable-diffusion-webui\modules\extras.py", line 79, in upscale c = upscaler.scaler.upscale(image, resize, upscaler.data_path) File "C:\Users\Default\stable-diffusion-webui\modules\upscaler.py", line 61, in upscale img = self.do_upscale(img, selected_model) File "C:\Users\Default\stable-diffusion-webui\modules\ldsr_model.py", line 51, in do_upscale ldsr = self.load_model(path) File "C:\Users\Default\stable-diffusion-webui\modules\ldsr_model.py", line 37, in load_model model = load_file_from_url(url=self.model_url, model_dir=self.model_path, File "C:\Users\Default\stable-diffusion-webui\venv\lib\site-packages\basicsr\utils\download_util.py", line 98, in load_file_from_url download_url_to_file(url, cached_file, hash_prefix=None, progress=progress) File "C:\Users\Default\stable-diffusion-webui\venv\lib\site-packages\torch\hub.py", line 593, in download_url_to_file u = urlopen(req) File "C:\Users\Default\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen return opener.open(url, data, timeout) File "C:\Users\Default\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 519, in open response = self._open(req, data) File "C:\Users\Default\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "C:\Users\Default\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 496, in _call_chain result = func(*args) File "C:\Users\Default\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "C:\Users\Default\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1351, in do_open raise URLError(err)

elite4jonny avatar Oct 05 '22 10:10 elite4jonny

Workaround: look in CMD to see what the errors are

found it is trying to download 2 files and place in \stable-diffusion-webui\models\LDSR
there is some sort of SSL error

files need to be renamed to what cmd is asking for - model.ckpt and project.yaml

After putting the files into the folder then it works fine

elite4jonny avatar Oct 08 '22 13:10 elite4jonny

Here's the URL for those pursuing the workaround: https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1

JustMaier avatar Oct 09 '22 18:10 JustMaier

Tried this workaround, seems it's no longer working.

in webgui: ConfigAttributeError: Missing key model full_key: model object_type=dict

and in cmd Loading model from C:\Users\penumbra\stable-diffusion-webui\models\LDSR\model.ckpt Error completing request Arguments: (0, 0, <PIL.Image.Image image mode=RGB size=512x512 at 0x195B4D47670>, None, 0, 0, 0, 2, 512, 512, True, 2, 2, 1) {} Traceback (most recent call last): File "C:\Users\penumbra\stable-diffusion-webui\modules\ui.py", line 184, in f res = list(func(*args, **kwargs)) File "C:\Users\penumbra\stable-diffusion-webui\webui.py", line 64, in f res = func(*args, **kwargs) File "C:\Users\penumbra\stable-diffusion-webui\modules\extras.py", line 95, in run_extras res = upscale(image, extras_upscaler_1, upscaling_resize, resize_mode, upscaling_resize_w, upscaling_resize_h, upscaling_crop) File "C:\Users\penumbra\stable-diffusion-webui\modules\extras.py", line 85, in upscale c = upscaler.scaler.upscale(image, resize, upscaler.data_path) File "C:\Users\penumbra\stable-diffusion-webui\modules\upscaler.py", line 62, in upscale img = self.do_upscale(img, selected_model) File "C:\Users\penumbra\stable-diffusion-webui\modules\ldsr_model.py", line 54, in do_upscale return ldsr.super_resolution(img, ddim_steps, self.scale) File "C:\Users\penumbra\stable-diffusion-webui\modules\ldsr_model_arch.py", line 87, in super_resolution model = self.load_model_from_config(half_attention) File "C:\Users\penumbra\stable-diffusion-webui\modules\ldsr_model_arch.py", line 25, in load_model_from_config model = instantiate_from_config(config.model) File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\dictconfig.py", line 355, in __getattr__ self._format_and_raise( File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\base.py", line 231, in _format_and_raise format_and_raise( File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\_utils.py", line 900, in format_and_raise _raise(ex, cause) File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\_utils.py", line 798, in _raise raise ex.with_traceback(sys.exc_info()[2]) # set env var OC_CAUSE=1 for full trace File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\dictconfig.py", line 351, in __getattr__ return self._get_impl( File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\dictconfig.py", line 442, in _get_impl node = self._get_child( File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\basecontainer.py", line 73, in _get_child child = self._get_node( File "C:\Users\penumbra\stable-diffusion-webui\venv\lib\site-packages\omegaconf\dictconfig.py", line 480, in _get_node raise ConfigKeyError(f"Missing key {key!s}") omegaconf.errors.ConfigAttributeError: Missing key model full_key: model object_type=dict

I'm afraid I'm just here reporting, I'm not familiar enough to know what's broken.

benthiclibrarian avatar Oct 18 '22 03:10 benthiclibrarian

Manually downloading and renaming the files to the location mentioned in the error just worked for me, make sure you do both the .ckpt and .yaml.

https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1 to \stable-diffusion-webui\models\LDSR\model.ckpt

and

https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1 to \stable-diffusion-webui\models\LDSR\project.yaml

Kahldris avatar Oct 23 '22 01:10 Kahldris

Assuming it is fixed by last comment. Reopen or create new one if not.

mezotaken avatar Jan 12 '23 23:01 mezotaken