pythonstable-diffusion

Proxy error while installing Stable Diffusion locally


I am installing Stable Diffusion on a local PC, Windows 10, Python 3.10.6.
While running the webui-user.bat, I meet the error:

F:\Stable Diffusion\stable-diffusion-webui>webui-user
venv "F:\Stable Diffusion\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)]
Commit hash: 955df7751eef11bb7697e2d77f6b8a6226b21e13

Installing requirements for Web UI
Launching Web UI with arguments:

No module 'xformers'. Proceeding without it.

Loading weights [cc6cb27103] from F:\Stable Diffusion\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.ckpt
Creating model from config: F:\Stable Diffusion\stable-diffusion-webui\configs\v1-inference.yaml

LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.

Applying cross attention optimization (Doggettx).

Textual inversion embeddings loaded(0):
Model loaded in 26.0s (load weights from disk: 10.1s, create model: 0.9s, apply weights to model: 6.2s, apply half(): 4.7s, move model to device: 1.0s, load textual inversion embeddings: 3.0s).

Traceback (most recent call last):
  File "F:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\requests\adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "F:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\requests\adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "F:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\requests\adapters.py", line 193, in proxy_manager_for
    manager = self.proxy_manager[proxy] = proxy_from_url(
  File "F:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\urllib3\poolmanager.py", line 537, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "F:\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\urllib3\poolmanager.py", line 481, in __init__
    raise ProxySchemeUnknown(proxy.scheme)

urllib3.exceptions.ProxySchemeUnknown: Proxy URL had no scheme, should start with http:// or https://

I don't know where to set the Proxy. Can anyone help?


Solution

  • You can set the proxy from the command line in Windows with:

    set http_proxy=http://username:password@proxy.example.com:8080 
    set https_proxy=http://username:password@proxy.example.com:8080
    

    Note: If your proxy uses the http scheme, then https_proxy should also use http, not https.