-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File is a RealESRGAN model, it can't be used as a ESRGAN model #2562
Comments
You're trying to use a real-ESRGAN model in the ESRGAN directory. Unless you use: #2067, it will not work, there's a separate directory for real-ESRGAN models. |
You can't use Real ESRGAN models with ESRGAN. Only the models for ESRGAN work. https://upscale.wiki/wiki/Model_Database This isn't a bug, you can close the issue. |
As mentioned, you can use the real-ESRGAN models with ESRGAN if you use the code in the PR. |
yeah, I saw #2067. But, after a lot of work and realizing that the WebUI defines the scalers available at startup from the folders it has in models, I was able to use RealESRGAN and ESRGAN. but.. RealESRGAN_x2plus - OK, works, but softens the image a quite a bit The thing was that for some reason, before it was trying to put and get the RealESRGAN models from the ESRGAN folder, or so it seemed. one more thing... About ScuNet. then, if I rename one of these models to ScuNet.pth, only selecting "ScuNet PSNR" on the interface works, if I select "ScuNet GAN", an error occurs: Traceback (most recent call last): If I leave both models in the folder with their original names, that's how they appear (with their full names) in the interface and both work. one more... The model proposed by #2092 does not work for me. to use SwinSR (SwinSR 4x) I had to download the model "003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth" from https://github.com/JingyunLiang/, and not "Swin2SR_RealworldSR_X4_64_BSRGAN_PSNR.pth" from "https://github.com/mv -lab/swin2sr" as #2092 says. I did this by seeing what the console says: Downloading: "https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth " to F:\stable-diffusion-webui\stable-diffusion-webui\models\SwinIR\SwinIR_4x .pth but it fails me with a long error that is basically a connection failure to the source. I download it separately, and it works, slow, but it's the best result I've seen so far among scaling models used in webui. one more more... LDSR wont work. it wont download. the model is in a web that requires an account (heibox.uni-heidelberg.de). so, the console spit an error that ends with: can i report these as separated issues? |
SwinIR and SwinIR v2 (what the mv-lab repo contains) are different things. SwinIR v2 needs to have the extension/file type |
I will report these three last issues. |
I have had this problem for a while, but I had not reported it so I started using BSRGAN.
The problem occurs when using any RealESRGAN option. happens equally with 2x and 4x
console:
Error completing request
Arguments: (0, 0, <PIL.Image.Image image mode=RGB size=512x501 at 0x1CD2D186FD0>, None, 1, 1, 1, 2, 512, 512, True, 4, 0, 1) {}
Traceback (most recent call last):
File "F:\stable-diffusion-webui\stable-diffusion-webui\modules\ui.py", line 186, in f
res = list(func(*args, **kwargs))
File "f:\stable-diffusion-webui\stable-diffusion-webui\webui.py", line 64, in f
res = func(*args, **kwargs)
File "F:\stable-diffusion-webui\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 "F:\stable-diffusion-webui\stable-diffusion-webui\modules\extras.py", line 85, in upscale
c = upscaler.scaler.upscale(image, resize, upscaler.data_path)
File "F:\stable-diffusion-webui\stable-diffusion-webui\modules\upscaler.py", line 62, in upscale
img = self.do_upscale(img, selected_model)
File "F:\stable-diffusion-webui\stable-diffusion-webui\modules\esrgan_model.py", line 94, in do_upscale
model = self.load_model(selected_model)
File "F:\stable-diffusion-webui\stable-diffusion-webui\modules\esrgan_model.py", line 115, in load_model
pretrained_net = fix_model_layers(crt_model, pretrained_net)
File "F:\stable-diffusion-webui\stable-diffusion-webui\modules\esrgan_model.py", line 22, in fix_model_layers
raise Exception("The file is a RealESRGAN model, it can't be used as a ESRGAN model.")
Exception: The file is a RealESRGAN model, it can't be used as a ESRGAN model.
Windows 10
Firefox
Commit hash: 08b3f7a (but it already happened from several previous)
The text was updated successfully, but these errors were encountered: