AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Couldn't launch webui correctly. #12179

Open wawyyehh opened 1 year ago

wawyyehh commented 1 year ago

Is there an existing issue for this?

What happened?

I decided to install this webui. When it fully installed, I tried to launch it. But when I'm trying to launch, a bug appears in log, not letting me to launch webui.

Steps to reproduce the problem

  1. Download webui through autoinstaller
  2. Press Launch Webui

What should have happened?

I can assume that it should've simply open a webui.

Version or Commit where the problem happens

v1.7.0

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

None

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Loading A111 WebUI Launcher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 i   Settings file found, loading
 →   Updating Settings File  ✓
 i   Launcher Version 1.7.0
 i   No Launcher launch options
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 →   Checking requirements :
 i   Python 3.10.6150.1013 found in registry:  C:\Users\1r7\AppData\Local\Programs\Python\Python310\
 i   Clearing PATH of any mention of Python
 →   Adding python 3.10 to path  ✓
 i   Git found and already in PATH:  C:\Program Files\Git\cmd\git.exe
 i   Automatic1111 SD WebUI found:  D:\SUPAAI\stable-diffusion-webui
 i   One or more checkpoint models were found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Loading Complete, opening launcher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 i   No arguments set
 i   No arguments set
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  WEBUI LAUNCHING VIA EMS LAUNCHER, EXIT THIS WINDOW TO STOP THE WEBUI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 !   Any error happening after 'commit hash : XXXX' is not related to the launcher. Please report them on Automatic1111's github instead :
 ☁   https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/new/choose
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Cancel
venv "D:\SUPAAI\stable-diffusion-webui\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.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Installing gfpgan
Traceback (most recent call last):
  File "D:\SUPAAI\stable-diffusion-webui\launch.py", line 39, in <module>
    main()
  File "D:\SUPAAI\stable-diffusion-webui\launch.py", line 30, in main
    prepare_environment()
  File "D:\SUPAAI\stable-diffusion-webui\modules\launch_utils.py", line 320, in prepare_environment
    run_pip(f"install {gfpgan_package}", "gfpgan")
  File "D:\SUPAAI\stable-diffusion-webui\modules\launch_utils.py", line 136, in run_pip
    return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
  File "D:\SUPAAI\stable-diffusion-webui\modules\launch_utils.py", line 113, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install gfpgan.
Command: "D:\SUPAAI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip --prefer-binary
Error code: 1
stdout: Collecting https://github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip

stderr:   WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Google Trust Services LLC'),), (('commonName', 'GTS CA 1C3'),)), 'version': 3, 'serialNumber': '78788CFABF087424104CDD551386723F', 'notBefore': 'Jul 10 08:21:49 2023 GMT', 'notAfter': 'Oct  2 08:21:48 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com'), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address', '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address', '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http://pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/QOvJ0N1sT2A.crl',)}
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'codeload.github.com' doesn't match either of 'dns.google', 'dns.google.com', '*.dns.google.com', '8888.google', 'dns64.dns.google', '8.8.8.8', '8.8.4.4', '2001:4860:4860:0:0:0:0:8888', '2001:4860:4860:0:0:0:0:8844', '2001:4860:4860:0:0:0:0:6464', '2001:4860:4860:0:0:0:0:64'"))': /TencentARC/GFPGAN/zip/8d2447a2d918f8eba5a4a01463fd48e45126a379
  WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Google Trust Services LLC'),), (('commonName', 'GTS CA 1C3'),)), 'version': 3, 'serialNumber': '78788CFABF087424104CDD551386723F', 'notBefore': 'Jul 10 08:21:49 2023 GMT', 'notAfter': 'Oct  2 08:21:48 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com'), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address', '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address', '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http://pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/QOvJ0N1sT2A.crl',)}
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'codeload.github.com' doesn't match either of 'dns.google', 'dns.google.com', '*.dns.google.com', '8888.google', 'dns64.dns.google', '8.8.8.8', '8.8.4.4', '2001:4860:4860:0:0:0:0:8888', '2001:4860:4860:0:0:0:0:8844', '2001:4860:4860:0:0:0:0:6464', '2001:4860:4860:0:0:0:0:64'"))': /TencentARC/GFPGAN/zip/8d2447a2d918f8eba5a4a01463fd48e45126a379
  WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Google Trust Services LLC'),), (('commonName', 'GTS CA 1C3'),)), 'version': 3, 'serialNumber': '78788CFABF087424104CDD551386723F', 'notBefore': 'Jul 10 08:21:49 2023 GMT', 'notAfter': 'Oct  2 08:21:48 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com'), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address', '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address', '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http://pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/QOvJ0N1sT2A.crl',)}
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'codeload.github.com' doesn't match either of 'dns.google', 'dns.google.com', '*.dns.google.com', '8888.google', 'dns64.dns.google', '8.8.8.8', '8.8.4.4', '2001:4860:4860:0:0:0:0:8888', '2001:4860:4860:0:0:0:0:8844', '2001:4860:4860:0:0:0:0:6464', '2001:4860:4860:0:0:0:0:64'"))': /TencentARC/GFPGAN/zip/8d2447a2d918f8eba5a4a01463fd48e45126a379
  WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Google Trust Services LLC'),), (('commonName', 'GTS CA 1C3'),)), 'version': 3, 'serialNumber': '78788CFABF087424104CDD551386723F', 'notBefore': 'Jul 10 08:21:49 2023 GMT', 'notAfter': 'Oct  2 08:21:48 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com'), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address', '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address', '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http://pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/QOvJ0N1sT2A.crl',)}
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'codeload.github.com' doesn't match either of 'dns.google', 'dns.google.com', '*.dns.google.com', '8888.google', 'dns64.dns.google', '8.8.8.8', '8.8.4.4', '2001:4860:4860:0:0:0:0:8888', '2001:4860:4860:0:0:0:0:8844', '2001:4860:4860:0:0:0:0:6464', '2001:4860:4860:0:0:0:0:64'"))': /TencentARC/GFPGAN/zip/8d2447a2d918f8eba5a4a01463fd48e45126a379
  WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Google Trust Services LLC'),), (('commonName', 'GTS CA 1C3'),)), 'version': 3, 'serialNumber': '78788CFABF087424104CDD551386723F', 'notBefore': 'Jul 10 08:21:49 2023 GMT', 'notAfter': 'Oct  2 08:21:48 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com'), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address', '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address', '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http://pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/QOvJ0N1sT2A.crl',)}
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(CertificateError("hostname 'codeload.github.com' doesn't match either of 'dns.google', 'dns.google.com', '*.dns.google.com', '8888.google', 'dns64.dns.google', '8.8.8.8', '8.8.4.4', '2001:4860:4860:0:0:0:0:8888', '2001:4860:4860:0:0:0:0:8844', '2001:4860:4860:0:0:0:0:6464', '2001:4860:4860:0:0:0:0:64'"))': /TencentARC/GFPGAN/zip/8d2447a2d918f8eba5a4a01463fd48e45126a379
  WARNING: Certificate did not match expected hostname: codeload.github.com. Certificate: {'subject': ((('commonName', 'dns.google'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'Google Trust Services LLC'),), (('commonName', 'GTS CA 1C3'),)), 'version': 3, 'serialNumber': '78788CFABF087424104CDD551386723F', 'notBefore': 'Jul 10 08:21:49 2023 GMT', 'notAfter': 'Oct  2 08:21:48 2023 GMT', 'subjectAltName': (('DNS', 'dns.google'), ('DNS', 'dns.google.com'), ('DNS', '*.dns.google.com'), ('DNS', '8888.google'), ('DNS', 'dns64.dns.google'), ('IP Address', '8.8.8.8'), ('IP Address', '8.8.4.4'), ('IP Address', '2001:4860:4860:0:0:0:0:8888'), ('IP Address', '2001:4860:4860:0:0:0:0:8844'), ('IP Address', '2001:4860:4860:0:0:0:0:6464'), ('IP Address', '2001:4860:4860:0:0:0:0:64')), 'OCSP': ('http://ocsp.pki.goog/gts1c3',), 'caIssuers': ('http://pki.goog/repo/certs/gts1c3.der',), 'crlDistributionPoints': ('http://crls.pki.goog/gts1c3/QOvJ0N1sT2A.crl',)}
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='codeload.github.com', port=443): Max retries exceeded with url: /TencentARC/GFPGAN/zip/8d2447a2d918f8eba5a4a01463fd48e45126a379 (Caused by SSLError(CertificateError("hostname 'codeload.github.com' doesn't match either of 'dns.google', 'dns.google.com', '*.dns.google.com', '8888.google', 'dns64.dns.google', '8.8.8.8', '8.8.4.4', '2001:4860:4860:0:0:0:0:8888', '2001:4860:4860:0:0:0:0:8844', '2001:4860:4860:0:0:0:0:6464', '2001:4860:4860:0:0:0:0:64'")))

[notice] A new release of pip available: 22.2.1 -> 23.2.1
[notice] To update, run: D:\SUPAAI\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip

Additional information

Actually, I use OperaGX to access the UI. I also tried to manually download gfpgan, but seems like it doesn't work at all.

hubba1987 commented 1 year ago

For some reason, when the script calls URL codeload.github.com from your PC it gets the wrong TLS certificate (certificate is for dns.google)

aftermath0703 commented 1 year ago

Maybe it's just a network problem, try a few more times

Maxioflex commented 1 year ago

maybe have you tried updating pip by using pip install --upgrade pip command listed at the very down below

wawyyehh commented 1 year ago

For some reason, when the script calls URL codeload.github.com from your PC it gets the wrong TLS certificate (certificate is for dns.google)

Could the browser that can't open the page with the download of the required file be the source of the problem? when I tried to install gfpgan myself, my browser couldn't open the download page (probably blocked in my country), so I had to use vpn in another browser to download it.

wawyyehh commented 1 year ago

aftermath0703

i tried this many times, i don't think that network is actually the issue

carlosgalveias commented 1 year ago

Have the same issue, network is fine.

carlosgalveias commented 1 year ago

Ok, I've found the issue. I had a virus on my pc. The virus changed my hosts file. So to fix:

Delyalend commented 1 year ago

I also had a problem with the virus. The hosts file has been changed. It is important that the hosts file does not have an extension, and since there was another hosts file with the ics extension in my folder, I mistakenly thought that if it was empty, then it was not the problem. Enable the display of hidden system files and make sure that the hosts file is really clean

sunnyochek commented 1 year ago

Ok, I've found the issue. I had a virus on my pc. The virus changed my hosts file. So to fix:

    1. clean your pc. I've had to go to windows defender and delete exclusions that something added there. Once I did that defender started complaining about viruses.
    1. then I used EEK (Emsisoft Emergency Kit) https://www.emsisoft.com/en/home/emergency-kit/
    1. once cleaned, open notepad as administrator, open file: C:\Windows\System32\drivers\etc\hosts and you should see a lot of domains set to 8.8.8.8 (that's what caused the issue). Delete all those lines.
    1. Make sure your device is update with all the security updates, and it should work now.

Thanks! It helped