Skip to content

HOW FIX THIS ERRORS??? RTX 5060 32GB #3067

@zDEBRYs

Description

@zDEBRYs

I spent a couple of hours trying to fix it myself. I searched the internet for solutions, but nothing worked.

RTX 5060
32 GB
AMD Ryzen 7 5700

venv "E:\! Ai\stable-diffusion-webui-forge\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: f2.0.1v1.10.1-previous-669-gdfdcbab6
Commit hash: dfdcbab685e57677014f05a3309b48cc87383167
Launching Web UI with arguments: --no-half --precision full --skip-torch-cuda-test --xformers
E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\torch\cuda\__init__.py:235: UserWarning:
NVIDIA GeForce RTX 5060 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 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(
Total VRAM 8150 MB, total RAM 32691 MB
pytorch version: 2.6.0+cu124
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.3.1+cu121 with CUDA 1201 (you have 2.6.0+cu124)
    Python  3.10.11 (you have 3.10.6)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\xformers\ops\fmha\flash.py:211: FutureWarning: `torch.library.impl_abstract` was renamed to `torch.library.register_fake`. Please use that instead; we will remove `torch.library.impl_abstract` in a future version of PyTorch.
  @torch.library.impl_abstract("xformers_flash::flash_fwd")
E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\xformers\ops\fmha\flash.py:344: FutureWarning: `torch.library.impl_abstract` was renamed to `torch.library.register_fake`. Please use that instead; we will remove `torch.library.impl_abstract` in a future version of PyTorch.
  @torch.library.impl_abstract("xformers_flash::flash_bwd")
WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
  File "E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\xformers\__init__.py", line 57, in _is_triton_available
    import triton  # noqa
ModuleNotFoundError: No module named 'triton'
E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\xformers\ops\swiglu_op.py:128: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(cls, ctx, x, w1, b1, w2, b2, w3, b3):
E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\xformers\ops\swiglu_op.py:149: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(cls, ctx, dx5):
xformers version: 0.0.27
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5060 : native
Hint: your device supports --cuda-malloc for potential speed improvements.
VAE dtype preferences: [torch.bfloat16, torch.float32] -> torch.bfloat16
CUDA Using Stream: False
Using pytorch cross attention
Using pytorch attention for VAE
ControlNet preprocessor location: E:\! Ai\stable-diffusion-webui-forge\models\ControlNetPreprocessor
2025-11-11 16:41:41,019 - ControlNet - INFO - ControlNet UI callback registered.
Model selected: {'checkpoint_info': {'filename': 'E:\\! Ai\\stable-diffusion-webui-forge\\models\\Stable-diffusion\\RealVisXL_V5.0_fp32.safetensors', 'hash': '9d0abdd4'}, 'additional_modules': ['E:\\! Ai\\stable-diffusion-webui-forge\\models\\VAE\\vae-ft-mse-840000-ema-pruned.safetensors'], 'unet_storage_dtype': None}
Using online LoRAs in FP16: False
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 14.2s (prepare environment: 0.7s, launcher: 0.4s, import torch: 8.1s, initialize shared: 0.1s, other imports: 0.2s, list SD models: 0.2s, load scripts: 1.5s, create ui: 2.0s, gradio launch: 1.0s).
Environment vars changed: {'stream': False, 'inference_memory': 1024.0, 'pin_shared_memory': False}
[GPU Setting] You will use 87.44% GPU memory (7126.00 MB) to load weights, and use 12.56% GPU memory (1024.00 MB) to do matrix computation.
Loading Model: {'checkpoint_info': {'filename': 'E:\\! Ai\\stable-diffusion-webui-forge\\models\\Stable-diffusion\\RealVisXL_V5.0_fp32.safetensors', 'hash': '9d0abdd4'}, 'additional_modules': ['E:\\! Ai\\stable-diffusion-webui-forge\\models\\VAE\\vae-ft-mse-840000-ema-pruned.safetensors'], 'unet_storage_dtype': None}
[Unload] Trying to free all memory for cuda:0 with 0 models keep loaded ... Done.
StateDict Keys: {'unet': 1680, 'vae': 250, 'text_encoder': 196, 'text_encoder_2': 518, 'ignore': 0}
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
IntegratedAutoencoderKL Unexpected: ['model_ema.decay', 'model_ema.num_updates']
K-Model Created: {'storage_dtype': torch.float16, 'computation_dtype': torch.float16}
Model loaded in 302.6s (unload existing model: 0.2s, forge model load: 302.3s).
[Unload] Trying to free 3051.58 MB for cuda:0 with 0 models keep loaded ... Done.
[Memory Management] Target: JointTextEncoder, Free GPU: 6920.90 MB, Model Require: 1559.68 MB, Previously Loaded: 0.00 MB, Inference Require: 1024.00 MB, Remaining: 4337.22 MB, All loaded to GPU.
Moving model(s) has taken 0.37 seconds
Traceback (most recent call last):
  File "E:\! Ai\stable-diffusion-webui-forge\modules_forge\main_thread.py", line 30, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "E:\! Ai\stable-diffusion-webui-forge\modules\txt2img.py", line 131, in txt2img_function
    processed = processing.process_images(p)
  File "E:\! Ai\stable-diffusion-webui-forge\modules\processing.py", line 842, in process_images
    res = process_images_inner(p)
  File "E:\! Ai\stable-diffusion-webui-forge\modules\processing.py", line 962, in process_images_inner
    p.setup_conds()
  File "E:\! Ai\stable-diffusion-webui-forge\modules\processing.py", line 1601, in setup_conds
    super().setup_conds()
  File "E:\! Ai\stable-diffusion-webui-forge\modules\processing.py", line 503, in setup_conds
    self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, total_steps, [self.cached_uc], self.extra_network_data)
  File "E:\! Ai\stable-diffusion-webui-forge\modules\processing.py", line 474, in get_conds_with_caching
    cache[1] = function(shared.sd_model, required_prompts, steps, hires_steps, shared.opts.use_old_scheduling)
  File "E:\! Ai\stable-diffusion-webui-forge\modules\prompt_parser.py", line 189, in get_learned_conditioning
    conds = model.get_learned_conditioning(texts)
  File "E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "E:\! Ai\stable-diffusion-webui-forge\backend\diffusion_engine\sdxl.py", line 89, in get_learned_conditioning
    cond_l = self.text_processing_engine_l(prompt)
  File "E:\! Ai\stable-diffusion-webui-forge\backend\text_processing\classic_engine.py", line 272, in __call__
    z = self.process_tokens(tokens, multipliers)
  File "E:\! Ai\stable-diffusion-webui-forge\backend\text_processing\classic_engine.py", line 305, in process_tokens
    z = self.encode_with_transformers(tokens)
  File "E:\! Ai\stable-diffusion-webui-forge\backend\text_processing\classic_engine.py", line 128, in encode_with_transformers
    self.text_encoder.transformer.text_model.embeddings.position_embedding = self.text_encoder.transformer.text_model.embeddings.position_embedding.to(dtype=torch.float32)
  File "E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 1343, in to
    return self._apply(convert)
  File "E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 930, in _apply
    param_applied = fn(param)
  File "E:\! Ai\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 1329, in convert
    return t.to(
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions