AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Stable diffusion model failed to load, exiting #7018

Closed Divitjal closed 1 year ago

Divitjal commented 1 year ago

Is there an existing issue for this?

What happened?

the UI is glitching out and not giviga me adress Screenshot (9)

Steps to reproduce the problem

  1. start webui-user
  2. then this happens
  3. ...

What should have happened?

it should have given me an ip adress for me to access the ui

Commit where the problem happens

after i start the webui-user

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

venv "C:\Users\ADMIN\Desktop\divit\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: f53527f7786575fe60da0223bd63ea3f0a06a754
Installing requirements for Web UI
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading weights [fe4efff1e1] from C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\models\Stable-diffusion\model.ckpt
loading stable diffusion model: RuntimeError
Traceback (most recent call last):
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\webui.py", line 77, in initialize
    modules.sd_models.load_model()
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\modules\sd_models.py", line 399, in load_model
    sd_model.to(shared.device)
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\core\mixins\device_dtype_mixin.py", line 113, in to
    return super().to(*args, **kwargs)
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 927, in to
    return self._apply(convert)
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 579, in _apply
    module._apply(fn)
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 579, in _apply
    module._apply(fn)
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 579, in _apply
    module._apply(fn)
  [Previous line repeated 4 more times]
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 602, in _apply
    param_applied = fn(param)
  File "C:\Users\ADMIN\Desktop\divit\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 925, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.71 GiB already allocated; 0 bytes free; 1.75 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Stable diffusion model failed to load, exiting
Press any key to continue . . .

Additional information, context and logs

No response

mezotaken commented 1 year ago

image Use --lowvram command line argument, but 2gb of VRAM for this is barely enough.

Divitjal commented 1 year ago

image Use --lowvram command line argument, but 2gb of VRAM for this is barely enough.

Where should I write the command line?

mezotaken commented 1 year ago

I provided a link with explanation image

set COMMANDLINE_ARGS=--lowvram

Divitjal commented 1 year ago

I provided a link with explanation image

set COMMANDLINE_ARGS=--lowvram

Thanks a lot will let you know if it works

qiaowei361 commented 1 year ago

image 没有用

ftium4 commented 1 year ago

After re-downloading(https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.safetensors) and overwriting, it does fix the problem

Yuto46 commented 1 year ago

venv "C:\SDUI\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.3.1 Commit hash: b6af0a3809ea869fb180633f9affcae4b199ffcf Traceback (most recent call last): File "C:\SDUI\stable-diffusion-webui[launch.py](https://www.youtube.com/redirect?event=comments&redir_token=QUFFLUhqblppa28tMFBoMWhEWG1mcFpULXhyOTFKbUJ3QXxBQ3Jtc0ttUFFHSHlvU2ctLXJvbE9IYzFnWTZwZW1KQWhPVGNfWW1ybGc2Q1VJSnh4TDg1YVBGYXNIRzhGTUZ4NUpIU3g4X2o2WUlVdm42VFVIbTA1bGktMkxfdDMtamRPVVB6WVM5ZHJSQ0tvOUZ0TE1iLWVpUQ&q=http%3A%2F%2Flaunch.py%2F&stzid=UgzLuwwpfmutC352eEZ4AaABAg.9qVJ73siCyC9qVQ_n8fBSb)", line 38, in main() File "C:\SDUI\stable-diffusion-webui[launch.py](https://www.youtube.com/redirect?event=comments&redir_token=QUFFLUhqbkJNV3J1ckx5M2xBZnlwZmVvdUJFTWI1eHZid3xBQ3Jtc0trdTRrWjhPYk1UdDJRQjMyNDJzaVFfN1oybFA2czVLY2dFMzBLam1VWV9pOTBMdnRFSEQ4S21vQzd5cWlCcGpiX1ktaW4wV3RRQmRqekNYcVFoWFlvUXRlWThvNVh2MFBTMjVJOF9ha1haczhzM3dZcw&q=http%3A%2F%2Flaunch.py%2F&stzid=UgzLuwwpfmutC352eEZ4AaABAg.9qVJ73siCyC9qVQ_n8fBSb)", line 29, in main prepareenvironment() File "C:\SDUI\stable-diffusion-webui\modules\launchutils.py", line 257, in prepare_environment raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check