#Getting this randomly on RTX PRO 6000 RuntimeError: CUDA unknown error.

3 messages · Page 1 of 1 (latest)

jaunty portal
#

ERROR: init 243 result=9Traceback (most recent call last):
File "/comfyui/main.py", line 177, in <module>
import execution
File "/comfyui/execution.py", line 15, in <module>
import comfy.model_management
File "/comfyui/comfy/model_management.py", line 239, in <module>
10/04/2026, 19:21:39
total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
^^^^^^^^^^^^^^^^^^
File "/comfyui/comfy/model_management.py", line 189, in get_torch_device
return torch.device(torch.cuda.current_device())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/torch/cuda/init.py", line 1069, in current_device
_lazy_init()
File "/opt/venv/lib/python3.12/site-packages/torch/cuda/init.py", line 410, in _lazy_init
torch._C._cuda_init()
RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero.
[W410 13:51:40.587614991 AllocatorConfig.cpp:28] Warning: PYTORCH_CUDA_ALLOC_CONF is deprecated, use PYTORCH_ALLOC_CONF instead (function operator())
worker-comfyui - Failed to connect to server at http://127.0.0.1:8188/ after 500 attempts.

I have minimum cuda version set as 12.6. Sometimes the GPU runs into errors sometimes it doesnt. Its very random.

vague spindleBOT
lament sparrowBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution