[Bug]: RTX 5050 Laptop GPU (sm_120) not supported by Fooocus bundled PyTorch
Checklist
- The issue has not been resolved by following the troubleshooting guide
- The issue exists on a clean installation of Fooocus
- The issue exists in the current version of Fooocus
- The issue has not been reported before recently
- The issue has been reported before but has not been fixed yet
What happened?
Fooocus starts successfully and detects my NVIDIA RTX 5050 Laptop GPU, but image generation fails during prompt processing with:
RuntimeError: CUDA error: no kernel image is available for execution on the device
The warning at startup indicates that the bundled PyTorch version does not support the GPU architecture:
NVIDIA GeForce RTX 5050 Laptop GPU 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.
Environment
- OS: Windows
- GPU: NVIDIA GeForce RTX 5050 Laptop GPU
- VRAM: ~8 GB
- RAM: ~16 GB
- Fooocus: Windows portable package 2.5.0
- Base model: JuggernautXL v8
- Original PyTorch:
2.1.0+cu121 - Original CUDA runtime:
12.1 - GPU compute capability:
sm_120
Error
Fooocus successfully starts and loads the model:
Device: cuda:0 NVIDIA GeForce RTX 5050 Laptop GPU : native
Base model loaded: juggernautXL_v8Rundiffusion.safetensors
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
App started successful.
However, generation fails while processing the prompt:
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
The traceback eventually reaches:
transformers/generation/utils.py
and fails at:
torch.isin(...)
with:
RuntimeError: CUDA error: no kernel image is available for execution on the device
Attempted workaround
I replaced the bundled PyTorch packages with:
torch==2.7.0+cu128
torchvision==0.22.0+cu128
torchaudio==2.7.0+cu128
After the upgrade, PyTorch correctly detects the GPU and a CUDA tensor operation works:
PyTorch: 2.7.0+cu128
CUDA: 12.8
GPU: NVIDIA GeForce RTX 5050 Laptop GPU
Capability: (12, 0)
CUDA available: True
GPU test: tensor(...)
However, launching Fooocus still appears to use the old PyTorch installation and reports:
The current PyTorch install supports CUDA capabilities
sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
and the same:
CUDA error: no kernel image is available for execution on the device
Question
What is the recommended way to run Fooocus 2.5.0 on an RTX 5050 / sm_120 GPU?
Is there an officially supported PyTorch/CUDA combination for the current Fooocus release, or does Fooocus require additional changes to its embedded Python environment/dependencies to support RTX 50-series GPUs?
Any guidance on the recommended PyTorch version and CUDA build for the Windows portable version would be appreciated.
Steps to reproduce the problem
Download and extract the Fooocus Windows portable package (version 2.5.0).
Launch Fooocus using the provided Windows startup script.
Use an NVIDIA GeForce RTX 5050 Laptop GPU with approximately 8 GB VRAM.
Select the default SDXL/JuggernautXL checkpoint.
Enter any text prompt.
Start image generation with the default generation settings.
Fooocus successfully initializes and detects the RTX 5050 GPU.
During prompt processing, Fooocus fails with:
RuntimeError: CUDA error: no kernel image is available for execution on the deviceThe startup log also reports that the RTX 5050 (
sm_120) is not supported by the bundled PyTorch installation.
What should have happened?
Fooocus should successfully recognize the NVIDIA RTX 5050 Laptop GPU (sm_120), initialize the CUDA backend, process the prompt, and generate the requested image without a CUDA kernel compatibility error.
What browsers do you use to access Fooocus?
Brave
Where are you running Fooocus?
Locally
What operating system are you using?
Windows 11
Console logs
Total VRAM: ~8151 MB
Total RAM: ~15987 MB
VRAM state: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5050 Laptop GPU : native
UserWarning:
NVIDIA GeForce RTX 5050 Laptop GPU 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.
Fooocus starts successfully and loads the SDXL checkpoint:
Base model loaded: juggernautXL_v8Rundiffusion.safetensors
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
App started successfully.
During image generation:
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
Traceback (most recent call last):
File "Fooocus/modules/async_worker.py", line 1471, in worker
handler(task)
File "Fooocus/modules/async_worker.py", line 1160, in handler
tasks, use_expansion, loras, current_progress = process_prompt(...)
File "Fooocus/modules/async_worker.py", line 738, in process_prompt
expansion = pipeline.final_expansion(t['task_prompt'], t['task_seed'])
File "Fooocus/extras/expansion.py", line 120, in __call__
features = self.model.generate(**tokenized_kwargs, ...)
File "transformers/generation/utils.py", line 1664, in generate
self._prepare_special_tokens(...)
File "transformers/generation/utils.py", line 1513, in _prepare_special_tokens
torch.isin(elements=eos_token_id, test_elements=pad_token_id).any()
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.
The same error occurs repeatedly when attempting to generate an image.
Additional information
The issue appears to be related to RTX 50-series / Blackwell GPU compatibility with the PyTorch version bundled with the Windows portable release.
The bundled environment initially used:
- PyTorch:
2.1.0+cu121 - CUDA:
12.1 - GPU compute capability:
sm_120
I also tested PyTorch 2.7.0+cu128 separately in the embedded Python environment. In that environment, CUDA works correctly:
PyTorch: 2.7.0+cu128
CUDA: 12.8
GPU: NVIDIA GeForce RTX 5050 Laptop GPU
Capability: (12, 0)
CUDA available: True
GPU test: tensor(...)
This confirms that the GPU and NVIDIA driver can successfully execute CUDA workloads with a newer PyTorch/CUDA combination.
However, Fooocus continues to report that sm_120 is unsupported and fails during prompt expansion with:
CUDA error: no kernel image is available for execution on the device
The failure occurs before the actual image generation stage, while Fooocus is processing the prompt through its expansion engine.
The main question is whether the current Fooocus release officially supports RTX 50-series GPUs and, if so, what PyTorch/CUDA versions or modifications to the portable environment are recommended.
Source: lllyasviel/Fooocus