AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: ScuNET PSNR use ScuNET GAN model instead of PSNR model #14506

Open ananosleep opened 10 months ago

ananosleep commented 10 months ago

Checklist

What happened?

When firstly use ScuNET PSNR , Downloading: "https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_gan.pth" to D:\AI\sd-webui\stable-diffusion-webui-dev\models\ScuNET\ScuNET.pth

However, it's ScuNET GAN model, and the correct model should be https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_psnr.pth

Steps to reproduce the problem

  1. Go to extra tab;
  2. select an image;
  3. select Scunet PSNR as Upscaler;
  4. generate.

What should have happened?

It should download PSNR model instead of GAN model.

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-01-02-15-57.json

Console logs

venv "D:\AI\sd-webui\stable-diffusion-webui-dev\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.7.0-133-gde03882d
Commit hash: de03882d6ca56bc81058f5120f028678a6a54aaa
Launching Web UI with arguments: --use-cpu all --precision full --no-half --skip-torch-cuda-test
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Loading weights [a2c153a866] from D:\AI\sd-webui\stable-diffusion-webui-dev\models\Stable-diffusion\Für-Alice.safetensors
Creating model from config: D:\AI\sd-webui\stable-diffusion-webui-dev\configs\v1-inference.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 15.7s (prepare environment: 0.5s, import torch: 4.2s, import gradio: 2.2s, setup paths: 2.5s, initialize shared: 0.3s, other imports: 2.6s, setup codeformer: 0.3s, list SD models: 0.3s, load scripts: 1.5s, create ui: 0.7s, gradio launch: 0.4s).
Applying attention optimization: InvokeAI... done.
Model loaded in 6.7s (load weights from disk: 0.6s, create model: 0.8s, apply weights to model: 5.0s, calculate empty prompt: 0.1s).
Downloading: "https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_gan.pth" to D:\AI\sd-webui\stable-diffusion-webui-dev\models\ScuNET\ScuNET.pth

100%|█████████████████████████████████████████████████████████████████████████████| 68.6M/68.6M [00:32<00:00, 2.18MB/s]
ScuNET tiles: 100%|████████████████████████████████████████████████████████████████████| 20/20 [00:54<00:00,  2.75s/it]

Additional information

No response

akx commented 10 months ago

I'm (slowly, since other work is interfering) working on reworking the upscaler system; this will be fixed then.

cout commented 3 months ago

The attached patch refactors scunet_model.py to work more like realesrgan_model.py. It uses the same local filename as previously (i.e. ScuNET.pth instead of scunet_color_real_gan.pth). scunet_model_fix_psnr.patch.txt