AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Can't use most of upscalers in latest sd-webui #7770

Open 925-Studio opened 1 year ago

925-Studio commented 1 year ago

Is there an existing issue for this?

What happened?

Can't use most of upscalers. Lanczos, Nearest, R-ESRGAN 4x+, these 3 upscalers are working fine. The others just crash in different ways.

Steps to reproduce the problem

  1. R-ESRGAN_4

    URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
  2. R-ESRGAN 4x+ Anime6B AttributeError: 'NoneType' object has no attribute 'local_data_path'

  3. LSDR Stuck at ...

    Loading model from /Users/silver/AI/stable-diffusion-webui/models/LDSR/model.ckpt
    LatentDiffusionV1: Running in eps-prediction mode
    DiffusionWrapperV1 has 113.62 M params.
    Keeping EMAs of 308.
    Applying cross attention optimization (InvokeAI).
    Down sample rate is 1 from 4 / 4 (Not downsampling)

    I have two option:

    • terminate the terminal and restart sd-webui
    • wait for system crash and reboot automatically
  4. ScuNET GAN

    URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
  5. ScuNET PSNR

    URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
  6. SwinIR_4x Python quit unexpectedly

SwinIR tiles:   0%|                                                                                                                                           | 0/35 [00:00<?, ?it/s]loc("mps_multiply"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":219:0)): error: input types 'tensor<1x36864x480xf16>' and 'tensor<1xf32>' are not broadcast compatible
LLVM ERROR: Failed to infer result type(s).
[1]    6059 abort      ./webui.sh
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

What should have happened?

Less error maybe?

Commit where the problem happens

Try to use upscalers in Extras

What platforms do you use to access the UI ?

MacOS on M1 chip.

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

Additional information

No response

Spaceman466 commented 1 year ago

Interesting. Not tried all of them, but at least Linear and R-ESRGAN x4 + ANIME v6 produce blurry images for me. Sticking to img2img for now. Shame.

ghost commented 1 year ago

i presume you downloaded upscaler .pth models of upscalers and you put them into models/esrgan , models/real-esrgan folders? for me it works from extras tab of webui1111... r-esrgan and r-esrgan_anime are VERY GOOD! I haven't do the comparison with NERO AI upscaler which is the best, but R-ESRGAN and ANIME is doing similar or even better than NERO(which is best of commercial upscalers) R-ESRGAN and ANIME is much better than TOPAZ Gigapixel AI for example...

Spaceman466 commented 1 year ago

i presume you downloaded upscaler .pth models of upscalers and you put them into models/esrgan , models/real-esrgan folders? for me it works from extras tab of webui1111... r-esrgan and r-esrgan_anime are VERY GOOD! I haven't do the comparison with NERO AI upscaler which is the best, but R-ESRGAN and ANIME is doing similar or even better than NERO(which is best of commercial upscalers) R-ESRGAN and ANIME is much better than TOPAZ Gigapixel AI for example...

Do I need to download anything? On holiday rn, but I'll bookmark this comment so when I get back on Monday I can give it a shot. Just links to any repos so I can clone thanks:)

Spaceman466 commented 1 year ago

Also, is hires. fix supposed to take a very very long time? I find it take up to 177s/it for me. I am running on AMD, Win64 but I have been trying different ways to get PyTorch to recognise my GPU, but it does not want to. I have a ryzen 5 zen2 though so it's gets about 20s/it on standard txt2img. Completely different issue, but I wasn't sure if that was fast or not, and ofc I can't use Xformers to speed it up.

ghost commented 1 year ago

hi spaceman, well it is well known that stable diffusion was meant to be used on Nvidia rtx cards, thats why i picked second hand rtx 3090 with 24gb vram... if you want to seriously use SD think about 18 - 100+gb vram nvidia card... :D no kidding

ATrubka commented 1 year ago

Watch this video on how to fix certificates: https://www.youtube.com/watch?v=dEBN1M609zk

StruggleYang commented 1 year ago

Use your version,Use this command:

/Applications/Python\ 3.9/Install\ Certificates.command