Stable diffusion model failed to load. #17430
Replies: 3 comments 1 reply
-
|
confused? Are you doing a new install of it? what is the exact OS and hardware using? |
Beta Was this translation helpful? Give feedback.
-
|
Your log shows the exact cause: The 50-series (Blackwell, compute capability sm_120) needs a PyTorch build compiled against CUDA 12.8 or newer. The torch the web UI installs by default does not include Blackwell kernels, so any GPU operation fails with "no kernel image is available". Updating PyTorch only helps if the new build is a CUDA 12.8 one, which is most likely why your earlier attempt did not fix it. Install a cu128 PyTorch into the web UI's own virtual environment, not your system Python:
Confirm the GPU is now usable: You should see a cu128 version, A couple of notes:
|
Beta Was this translation helpful? Give feedback.
-
|
Hi! This error is a compatibility issue with PyTorch and the new RTX 50-series GPUs (Blackwell architecture, e.g. RTX 5090, 5080). Why it failsOlder PyTorch releases (like PyTorch 2.1.2 compiled with CUDA 11.8 or CUDA 12.1, which the WebUI installer installs by default) do not support the Compute Capability 10.0 required for Blackwell GPUs. This causes the CUDA driver initialization to panic or silently fail when attempting to load models. How to resolve thisTo run the WebUI on a 50-series card, you need to manually upgrade PyTorch to a version compiled with CUDA 12.4 or newer:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a 50 series gpu and ive been doing everything the instructions have said to do and now I am getting this error. The web ui open but doesnt work since the model hasent been loaded. Ive tried to update pytorch and that did not fix the error.
Log:
venv "F:\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.10.1-96-g1937682a
Commit hash: 1937682
Launching Web UI with arguments:
F:\stable-diffusion-webui\venv\lib\site-packages\timm\models\layers_init_.py:49: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
warnings.warn(f"Importing from {name} is deprecated, please import via timm.layers", FutureWarning)
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
F:\stable-diffusion-webui\venv\lib\site-packages\torch\cuda_init_.py:215: UserWarning:
NVIDIA GeForce RTX 5060 Ti with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
Loading weights [6ce0161689] from F:\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: F:\stable-diffusion-webui\configs\v1-inference.yaml
F:\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\file_download.py:949: FutureWarning:
resume_downloadis deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, useforce_download=True.warnings.warn(
loading stable diffusion model: RuntimeError
Traceback (most recent call last):
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "F:\stable-diffusion-webui\modules\initialize.py", line 149, in load_model
shared.sd_model # noqa: B018
File "F:\stable-diffusion-webui\modules\shared_items.py", line 177, in sd_model
return modules.sd_models.model_data.get_sd_model()
File "F:\stable-diffusion-webui\modules\sd_models.py", line 683, in get_sd_model
load_model()
File "F:\stable-diffusion-webui\modules\sd_models.py", line 836, in load_model
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
File "F:\stable-diffusion-webui\modules\sd_models.py", line 430, in load_model_weights
model.load_state_dict(state_dict, strict=False)
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 223, in
module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, **kwargs: load_state_dict(module_load_state_dict, *args, **kwargs))
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 221, in load_state_dict
original(module, state_dict, strict=strict)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2138, in load_state_dict
load(self, state_dict)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load
load(child, child_state_dict, child_prefix)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load
load(child, child_state_dict, child_prefix)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load
load(child, child_state_dict, child_prefix)
[Previous line repeated 1 more time]
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2120, in load
module._load_from_state_dict(
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 225, in
linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda *args, **kwargs: load_from_state_dict(linear_load_from_state_dict, *args, **kwargs))
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 191, in load_from_state_dict
module.parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch_meta_registrations.py", line 4516, in zeros_like
res.fill(0)
RuntimeError: CUDA error: no kernel image is available for execution on the device
Compile with
TORCH_USE_CUDA_DSAto enable device-side assertions.Stable diffusion model failed to load
Applying attention optimization: Doggettx... done.
Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=Trueinlaunch().Startup time: 10.1s (prepare environment: 2.4s, import torch: 3.6s, import gradio: 0.8s, setup paths: 0.6s, initialize shared: 0.2s, other imports: 0.6s, list SD models: 0.5s, load scripts: 0.9s, create ui: 0.4s, gradio launch: 0.1s).
Exception in thread Thread-20 (load_model):
Traceback (most recent call last):
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "F:\stable-diffusion-webui\modules\initialize.py", line 154, in load_model
devices.first_time_calculation()
File "F:\stable-diffusion-webui\modules\devices.py", line 281, in first_time_calculation
conv2d(x)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "F:\stable-diffusion-webui\extensions-builtin\Lora\networks.py", line 599, in network_Conv2d_forward
return originals.Conv2d_forward(self, input)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward
return self._conv_forward(input, self.weight, self.bias)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: CUDA error: no kernel image is available for execution on the device
Compile with
TORCH_USE_CUDA_DSAto enable device-side assertions.Loading weights [6ce0161689] from F:\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: F:\stable-diffusion-webui\configs\v1-inference.yaml
F:\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\file_download.py:949: FutureWarning:
resume_downloadis deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, useforce_download=True.warnings.warn(
loading stable diffusion model: RuntimeError
Traceback (most recent call last):
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File "C:\Users\Jackson\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "F:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run
result = context.run(func, *args)
File "F:\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "F:\stable-diffusion-webui\modules\ui.py", line 1168, in
update_image_cfg_scale_visibility = lambda: gr.update(visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit")
File "F:\stable-diffusion-webui\modules\shared_items.py", line 177, in sd_model
return modules.sd_models.model_data.get_sd_model()
File "F:\stable-diffusion-webui\modules\sd_models.py", line 683, in get_sd_model
load_model()
File "F:\stable-diffusion-webui\modules\sd_models.py", line 836, in load_model
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
File "F:\stable-diffusion-webui\modules\sd_models.py", line 430, in load_model_weights
model.load_state_dict(state_dict, strict=False)
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 223, in
module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, **kwargs: load_state_dict(module_load_state_dict, *args, **kwargs))
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 221, in load_state_dict
original(module, state_dict, strict=strict)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2138, in load_state_dict
load(self, state_dict)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load
load(child, child_state_dict, child_prefix)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load
load(child, child_state_dict, child_prefix)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load
load(child, child_state_dict, child_prefix)
[Previous line repeated 1 more time]
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2120, in load
module._load_from_state_dict(
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 225, in
linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda *args, **kwargs: load_from_state_dict(linear_load_from_state_dict, *args, **kwargs))
File "F:\stable-diffusion-webui\modules\sd_disable_initialization.py", line 191, in load_from_state_dict
module.parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad)
File "F:\stable-diffusion-webui\venv\lib\site-packages\torch_meta_registrations.py", line 4516, in zeros_like
res.fill(0)
RuntimeError: CUDA error: no kernel image is available for execution on the device
Compile with
TORCH_USE_CUDA_DSAto enable device-side assertions.Stable diffusion model failed to load
Beta Was this translation helpful? Give feedback.
All reactions