[GH-ISSUE #32] Fatal access violation (0xC0000005) in _scaled_mm_v2 on ROCm Windows #17

Closed
opened 2026-10-26 22:19:09 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @0xDELUXA on GitHub (Mar 19, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/32

Environment

  • GPU: AMD Radeon RX 9060 XT (RDNA4, gfx1200)
  • ROCm: 7.13.0a20260318 (torch.version.hip = "7.2.0")
  • Python: 3.12
  • OS: Windows 11
  • Model: Flux2 with mixed FP8 quantization

Problem

Running a Flux2 FP8-quantized model causes a fatal Windows access violation (0xC0000005) inside torch_hip.dll at at::cuda::_scaled_mm_v2.

This is not a catchable Python exception - the process is killed by the OS before Python regains control, so the existing except (RuntimeError, TypeError) fallback in _handle_fp8_linear never fires.

Stack trace (key frames)

comfy_kitchen/scaled_mm_v2.py, line 41     in scaled_mm_v2
comfy_kitchen/tensor/fp8.py,   line 94     in _fp8_scaled_mm
comfy_kitchen/tensor/fp8.py,   line 157    in _handle_fp8_linear
→ at::cuda::_scaled_mm_v2(...) [torch_hip.dll+0x263f287]  ← crash here

Root cause

torch.ops.aten._scaled_mm_v2 exists in the ROCm PyTorch build and is importable, but calling it on RDNA4/gfx1200 triggers a segfault - the required HIP kernel appears to be missing or not compiled for this architecture in the current PyTorch ROCm release.

I'm considering whether I should also report this issue in the TheRock repo as well.

Full crash log
  0%|                                                                                                                                                         | 0/4 [00:00<?, ?it/s,   Model Initializing ...  ]Windows fatal exception: access violation

Thread 0x000048f8 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 359 in wait
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 655 in wait
  File "C:\ComfyUI\venv\Lib\site-packages\tqdm\_monitor.py", line 60 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004a7c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004d1c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x000047a0 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x000048c8 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004e7c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00002410 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004e90 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00000d50 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00003e60 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004b64 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00003600 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004ae8 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004ffc (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x000005dc (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004ac4 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x0000442c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00000e3c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004f3c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00003f60 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x0000474c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Current thread 0x00004eb0 (most recent call first):
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\functional.py", line 6811 in scaled_mm
  File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\scaled_mm_v2.py", line 41 in scaled_mm_v2
  File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\tensor\fp8.py", line 94 in _fp8_scaled_mm
  File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\tensor\fp8.py", line 157 in _handle_fp8_linear
  File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\tensor\base.py", line 348 in __torch_dispatch__
  File "C:\ComfyUI\comfy\ops.py", line 957 in _forward
  File "C:\ComfyUI\comfy\ops.py", line 961 in forward_comfy_cast_weights
  File "C:\ComfyUI\comfy\ops.py", line 990 in forward
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
  File "C:\ComfyUI\comfy\ldm\flux\layers.py", line 205 in forward
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
  File "C:\ComfyUI\comfy\ldm\flux\model.py", line 243 in forward_orig
  File "C:\ComfyUI\comfy\ldm\flux\model.py", line 406 in _forward
  File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute
  File "C:\ComfyUI\comfy\ldm\flux\model.py", line 345 in forward
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
  File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
  File "C:\ComfyUI\comfy\model_base.py", line 209 in _apply_model
  File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute
  File "C:\ComfyUI\comfy\model_base.py", line 170 in apply_model
  File "C:\ComfyUI\comfy\samplers.py", line 325 in _calc_cond_batch
  File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute
  File "C:\ComfyUI\comfy\samplers.py", line 213 in _calc_cond_batch_outer
  File "C:\ComfyUI\comfy\samplers.py", line 205 in calc_cond_batch
  File "C:\ComfyUI\comfy\samplers.py", line 380 in sampling_function
  File "C:\ComfyUI\comfy\samplers.py", line 964 in predict_noise
  File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute
  File "C:\ComfyUI\comfy\samplers.py", line 961 in outer_predict_noise
  File "C:\ComfyUI\comfy\samplers.py", line 954 in __call__
  File "C:\ComfyUI\comfy\samplers.py", line 400 in __call__
  File "C:\ComfyUI\comfy\k_diffusion\sampling.py", line 205 in sample_euler
  File "C:\ComfyUI\venv\Lib\site-packages\torch\utils\_contextlib.py", line 124 in decorate_context
  File "C:\ComfyUI\comfy\samplers.py", line 751 in sample
  File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute
  File "C:\ComfyUI\comfy\samplers.py", line 981 in inner_sample
  File "C:\ComfyUI\comfy\samplers.py", line 995 in outer_sample
  File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute
  File "C:\ComfyUI\comfy\samplers.py", line 1051 in sample
  File "C:\ComfyUI\comfy\samplers.py", line 1069 in sample
  File "C:\ComfyUI\comfy\samplers.py", line 1179 in sample
  File "C:\ComfyUI\comfy\sample.py", line 66 in sample
  File "C:\ComfyUI\nodes.py", line 1556 in common_ksampler
  File "C:\ComfyUI\nodes.py", line 1591 in sample
  File "C:\ComfyUI\execution.py", line 296 in process_inputs
  File "C:\ComfyUI\execution.py", line 308 in _async_map_node_over_list
  File "C:\ComfyUI\execution.py", line 334 in get_output_data
  File "C:\ComfyUI\execution.py", line 525 in execute
  File "C:\ComfyUI\execution.py", line 758 in execute_async
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\events.py", line 88 in _run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1999 in _run_once
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 645 in run_forever
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 678 in run_until_complete
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 195 in run
  File "C:\ComfyUI\execution.py", line 702 in execute
  File "<string>", line 276 in prompt_worker
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004cd4 (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 314 in _select
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 323 in select
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1961 in _run_once
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 645 in run_forever
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 678 in run_until_complete
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 195 in run
  File "C:\ComfyUI\custom_nodes\ComfyUI-Crystools\general\monitor.py", line 31 in startMonitorLoop
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap

Thread 0x00004f2c (most recent call first):
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 314 in _select
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 323 in select
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1961 in _run_once
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 645 in run_forever
  File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 678 in run_until_complete
  File "<string>", line 478 in <module>
  File "C:\ComfyUI\start_comfy_with_asyncio_patch.py", line 8 in <module>
Exception Code: 0xC0000005
  #0 0x00007fffa4650000 (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_hip.dll+0x0)
  #1 0x00007fffa6c8f287 at::cuda::_scaled_mm_v2(class at::Tensor const &, class at::Tensor const &, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class std::optional<class at::Tensor> const &, class std::optional<enum c10::ScalarType>, class c10::ArrayRef<__int64>, bool) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_hip.dll+0x263f287)
  #2 0x00007fffa6e1a8fd at::cuda::_fused_adagrad_(class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<class at::Tensor>, class at::Tensor const &, double, double, double, bool, class std::optional<class at::Tensor> const &, class std::optional<class at::Tensor> const &) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_hip.dll+0x27ca8fd)
  #3 0x00007ffface0c52e at::_ops::_scaled_mm_v2::call(class at::Tensor const &, class at::Tensor const &, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class std::optional<class at::Tensor> const &, class std::optional<enum c10::ScalarType>, class c10::ArrayRef<__int64>, bool) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x12bc52e)
  #4 0x00007fffa303717a THPPointer<struct _object>::release(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0x1f717a)
  #5 0x00007ff8035479e4 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x379e4)
  #6 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018)
  #7 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5)
  #8 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5)
  #9 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #10 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
 #11 0x00007ff803591a5f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x81a5f)
 #12 0x00007ff803517e26 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7e26)
 #13 0x00007ff803517cd2 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7cd2)
 #14 0x00007fffa3a3385a torch::handle_torch_function_no_python_arg_parser(class c10::ArrayRef<struct _object *>, struct _object *, struct _object *, char const *, struct _object *, char const *, enum torch::TorchFunctionName) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0xbf385a)
 #15 0x00007fffa33a5662 getPyInterpreter(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0x565662)
 #16 0x00007fffabf32c93 at::impl::MaybeSetTLSOnEntryGuard::~MaybeSetTLSOnEntryGuard(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x3e2c93)
 #17 0x00007fffabf3356b at::impl::MaybeSetTLSOnEntryGuard::~MaybeSetTLSOnEntryGuard(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x3e356b)
 #18 0x00007fffacb6b0fd at::_ops::linear::call(class at::Tensor const &, class at::Tensor const &, class std::optional<class at::Tensor> const &) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x101b0fd)
 #19 0x00007fffacb6a66c at::_ops::linear::call(class at::Tensor const &, class at::Tensor const &, class std::optional<class at::Tensor> const &) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x101a66c)
 #20 0x00007fffa3243ac6 THPPointer<struct _object>::release(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0x403ac6)
 #21 0x00007ff8035479e4 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x379e4)
 #22 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018)
 #23 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5)
 #24 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5)
 #25 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #26 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
 #27 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
 #28 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #29 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #30 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #31 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
 #32 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
 #33 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #34 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #35 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #36 0x00007ff8035c3e8b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3e8b)
 #37 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b)
 #38 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6)
 #39 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018)
 #40 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5)
 #41 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5)
 #42 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #43 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #44 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #45 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #46 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #47 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #48 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #49 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #50 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #51 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #52 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #53 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03)
 #54 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b)
 #55 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6)
 #56 0x00007ff8035c27a6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb27a6)
 #57 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #58 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #59 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
 #60 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
 #61 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #62 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #63 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #64 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
 #65 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
 #66 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #67 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #68 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #69 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #70 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #71 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #72 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #73 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #74 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #75 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #76 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #77 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #78 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #79 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03)
 #80 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b)
 #81 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6)
 #82 0x00007ff8035c27a6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb27a6)
 #83 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #84 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #85 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #86 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #87 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #88 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #89 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #90 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #91 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #92 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #93 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #94 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
 #95 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
 #96 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
 #97 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
 #98 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
 #99 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#100 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
#101 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
#102 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#103 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#104 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#105 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
#106 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
#107 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#108 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#109 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#110 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03)
#111 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b)
#112 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6)
#113 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018)
#114 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5)
#115 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5)
#116 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#117 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03)
#118 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b)
#119 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6)
#120 0x00007ff8035c27a6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb27a6)
#121 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#122 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#123 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e)
#124 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
#125 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#126 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#127 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#128 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
#129 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
#130 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#131 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#132 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#133 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18)
#134 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b)
#135 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#136 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#137 0x00007ff80355b201 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x4b201)
#138 0x00007ff803754f58 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x244f58)
#139 0x00007ff80374b57d (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x23b57d)
#140 0x00007ff89c5f7334 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\DLLs\_asyncio.pyd+0x7334)
#141 0x00007ff89c5f6c7e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\DLLs\_asyncio.pyd+0x6c7e)
#142 0x00007ff89c5f7574 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\DLLs\_asyncio.pyd+0x7574)
#143 0x00007ff80358cc79 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7cc79)
#144 0x00007ff8037796b1 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x2696b1)
#145 0x00007ff8037799c0 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x2699c0)
#146 0x00007ff803578376 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x68376)
#147 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
#148 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#149 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee)
#150 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c)
#151 0x00007ff80358be6c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be6c)
#152 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815)
#153 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f)
#154 0x00007ff80353304c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x2304c)
#155 0x00007ff803532ff2 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x22ff2)
#156 0x00007ff8c28e37b0 (C:\Windows\System32\ucrtbase.dll+0x37b0)
#157 0x00007ff8c40de8d7 (C:\Windows\System32\KERNEL32.DLL+0x2e8d7)
#158 0x00007ff8c592c48c (C:\Windows\SYSTEM32\ntdll.dll+0x8c48c)
Press any key to continue . . .
Originally created by @0xDELUXA on GitHub (Mar 19, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/32 ## Environment - **GPU:** AMD Radeon RX 9060 XT (RDNA4, `gfx1200`) - **ROCm:** `7.13.0a20260318` (`torch.version.hip = "7.2.0"`) - **Python:** 3.12 - **OS:** Windows 11 - **Model:** Flux2 with mixed FP8 quantization ## Problem Running a Flux2 FP8-quantized model causes a fatal Windows access violation (`0xC0000005`) inside `torch_hip.dll` at `at::cuda::_scaled_mm_v2`. This is **not a catchable Python exception** - the process is killed by the OS before Python regains control, so the existing `except (RuntimeError, TypeError)` fallback in `_handle_fp8_linear` never fires. ## Stack trace (key frames) ``` comfy_kitchen/scaled_mm_v2.py, line 41 in scaled_mm_v2 comfy_kitchen/tensor/fp8.py, line 94 in _fp8_scaled_mm comfy_kitchen/tensor/fp8.py, line 157 in _handle_fp8_linear → at::cuda::_scaled_mm_v2(...) [torch_hip.dll+0x263f287] ← crash here ``` ## Root cause `torch.ops.aten._scaled_mm_v2` exists in the ROCm PyTorch build and is importable, but calling it on RDNA4/`gfx1200` triggers a segfault - the required HIP kernel appears to be missing or not compiled for this architecture in the current PyTorch ROCm release. I'm considering whether I should also report this issue in the TheRock repo as well. <details> <summary>Full crash log</summary> ``` 0%| | 0/4 [00:00<?, ?it/s, Model Initializing ... ]Windows fatal exception: access violation Thread 0x000048f8 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 359 in wait File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 655 in wait File "C:\ComfyUI\venv\Lib\site-packages\tqdm\_monitor.py", line 60 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004a7c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004d1c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x000047a0 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x000048c8 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004e7c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00002410 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004e90 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00000d50 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00003e60 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004b64 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00003600 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004ae8 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004ffc (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x000005dc (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004ac4 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x0000442c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00000e3c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004f3c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00003f60 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x0000474c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 90 in _worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Current thread 0x00004eb0 (most recent call first): File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\functional.py", line 6811 in scaled_mm File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\scaled_mm_v2.py", line 41 in scaled_mm_v2 File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\tensor\fp8.py", line 94 in _fp8_scaled_mm File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\tensor\fp8.py", line 157 in _handle_fp8_linear File "C:\ComfyUI\venv\Lib\site-packages\comfy_kitchen\tensor\base.py", line 348 in __torch_dispatch__ File "C:\ComfyUI\comfy\ops.py", line 957 in _forward File "C:\ComfyUI\comfy\ops.py", line 961 in forward_comfy_cast_weights File "C:\ComfyUI\comfy\ops.py", line 990 in forward File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\ComfyUI\comfy\ldm\flux\layers.py", line 205 in forward File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\ComfyUI\comfy\ldm\flux\model.py", line 243 in forward_orig File "C:\ComfyUI\comfy\ldm\flux\model.py", line 406 in _forward File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute File "C:\ComfyUI\comfy\ldm\flux\model.py", line 345 in forward File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\ComfyUI\venv\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\ComfyUI\comfy\model_base.py", line 209 in _apply_model File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute File "C:\ComfyUI\comfy\model_base.py", line 170 in apply_model File "C:\ComfyUI\comfy\samplers.py", line 325 in _calc_cond_batch File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute File "C:\ComfyUI\comfy\samplers.py", line 213 in _calc_cond_batch_outer File "C:\ComfyUI\comfy\samplers.py", line 205 in calc_cond_batch File "C:\ComfyUI\comfy\samplers.py", line 380 in sampling_function File "C:\ComfyUI\comfy\samplers.py", line 964 in predict_noise File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute File "C:\ComfyUI\comfy\samplers.py", line 961 in outer_predict_noise File "C:\ComfyUI\comfy\samplers.py", line 954 in __call__ File "C:\ComfyUI\comfy\samplers.py", line 400 in __call__ File "C:\ComfyUI\comfy\k_diffusion\sampling.py", line 205 in sample_euler File "C:\ComfyUI\venv\Lib\site-packages\torch\utils\_contextlib.py", line 124 in decorate_context File "C:\ComfyUI\comfy\samplers.py", line 751 in sample File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute File "C:\ComfyUI\comfy\samplers.py", line 981 in inner_sample File "C:\ComfyUI\comfy\samplers.py", line 995 in outer_sample File "C:\ComfyUI\comfy\patcher_extension.py", line 112 in execute File "C:\ComfyUI\comfy\samplers.py", line 1051 in sample File "C:\ComfyUI\comfy\samplers.py", line 1069 in sample File "C:\ComfyUI\comfy\samplers.py", line 1179 in sample File "C:\ComfyUI\comfy\sample.py", line 66 in sample File "C:\ComfyUI\nodes.py", line 1556 in common_ksampler File "C:\ComfyUI\nodes.py", line 1591 in sample File "C:\ComfyUI\execution.py", line 296 in process_inputs File "C:\ComfyUI\execution.py", line 308 in _async_map_node_over_list File "C:\ComfyUI\execution.py", line 334 in get_output_data File "C:\ComfyUI\execution.py", line 525 in execute File "C:\ComfyUI\execution.py", line 758 in execute_async File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\events.py", line 88 in _run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1999 in _run_once File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 645 in run_forever File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 678 in run_until_complete File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 195 in run File "C:\ComfyUI\execution.py", line 702 in execute File "<string>", line 276 in prompt_worker File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004cd4 (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 314 in _select File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 323 in select File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1961 in _run_once File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 645 in run_forever File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 678 in run_until_complete File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 195 in run File "C:\ComfyUI\custom_nodes\ComfyUI-Crystools\general\monitor.py", line 31 in startMonitorLoop File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012 in run File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075 in _bootstrap_inner File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1032 in _bootstrap Thread 0x00004f2c (most recent call first): File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 314 in _select File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\selectors.py", line 323 in select File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1961 in _run_once File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 645 in run_forever File "C:\Users\deluxa\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 678 in run_until_complete File "<string>", line 478 in <module> File "C:\ComfyUI\start_comfy_with_asyncio_patch.py", line 8 in <module> Exception Code: 0xC0000005 #0 0x00007fffa4650000 (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_hip.dll+0x0) #1 0x00007fffa6c8f287 at::cuda::_scaled_mm_v2(class at::Tensor const &, class at::Tensor const &, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class std::optional<class at::Tensor> const &, class std::optional<enum c10::ScalarType>, class c10::ArrayRef<__int64>, bool) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_hip.dll+0x263f287) #2 0x00007fffa6e1a8fd at::cuda::_fused_adagrad_(class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<class at::Tensor>, class at::Tensor const &, double, double, double, bool, class std::optional<class at::Tensor> const &, class std::optional<class at::Tensor> const &) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_hip.dll+0x27ca8fd) #3 0x00007ffface0c52e at::_ops::_scaled_mm_v2::call(class at::Tensor const &, class at::Tensor const &, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class c10::ArrayRef<class at::Tensor>, class c10::ArrayRef<__int64>, class c10::ArrayRef<__int64>, class std::optional<class at::Tensor> const &, class std::optional<enum c10::ScalarType>, class c10::ArrayRef<__int64>, bool) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x12bc52e) #4 0x00007fffa303717a THPPointer<struct _object>::release(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0x1f717a) #5 0x00007ff8035479e4 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x379e4) #6 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018) #7 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5) #8 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5) #9 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #10 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #11 0x00007ff803591a5f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x81a5f) #12 0x00007ff803517e26 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7e26) #13 0x00007ff803517cd2 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7cd2) #14 0x00007fffa3a3385a torch::handle_torch_function_no_python_arg_parser(class c10::ArrayRef<struct _object *>, struct _object *, struct _object *, char const *, struct _object *, char const *, enum torch::TorchFunctionName) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0xbf385a) #15 0x00007fffa33a5662 getPyInterpreter(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0x565662) #16 0x00007fffabf32c93 at::impl::MaybeSetTLSOnEntryGuard::~MaybeSetTLSOnEntryGuard(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x3e2c93) #17 0x00007fffabf3356b at::impl::MaybeSetTLSOnEntryGuard::~MaybeSetTLSOnEntryGuard(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x3e356b) #18 0x00007fffacb6b0fd at::_ops::linear::call(class at::Tensor const &, class at::Tensor const &, class std::optional<class at::Tensor> const &) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x101b0fd) #19 0x00007fffacb6a66c at::_ops::linear::call(class at::Tensor const &, class at::Tensor const &, class std::optional<class at::Tensor> const &) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_cpu.dll+0x101a66c) #20 0x00007fffa3243ac6 THPPointer<struct _object>::release(void) (C:\ComfyUI\venv\Lib\site-packages\torch\lib\torch_python.dll+0x403ac6) #21 0x00007ff8035479e4 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x379e4) #22 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018) #23 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5) #24 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5) #25 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #26 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #27 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #28 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #29 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #30 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #31 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #32 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #33 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #34 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #35 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #36 0x00007ff8035c3e8b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3e8b) #37 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b) #38 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6) #39 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018) #40 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5) #41 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5) #42 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #43 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #44 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #45 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #46 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #47 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #48 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #49 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #50 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #51 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #52 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #53 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03) #54 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b) #55 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6) #56 0x00007ff8035c27a6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb27a6) #57 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #58 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #59 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #60 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #61 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #62 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #63 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #64 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #65 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #66 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #67 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #68 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #69 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #70 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #71 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #72 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #73 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #74 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #75 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #76 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #77 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #78 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #79 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03) #80 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b) #81 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6) #82 0x00007ff8035c27a6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb27a6) #83 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #84 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #85 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #86 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #87 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #88 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #89 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #90 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #91 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #92 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #93 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #94 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #95 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #96 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #97 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #98 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #99 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #100 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #101 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #102 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #103 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #104 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #105 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #106 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #107 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #108 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #109 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #110 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03) #111 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b) #112 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6) #113 0x00007ff803592018 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82018) #114 0x00007ff8035919c5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x819c5) #115 0x00007ff803592ea5 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x82ea5) #116 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #117 0x00007ff8035c3f03 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb3f03) #118 0x00007ff80366319b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x15319b) #119 0x00007ff8036630c6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x1530c6) #120 0x00007ff8035c27a6 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb27a6) #121 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #122 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #123 0x00007ff80358bd8e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7bd8e) #124 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #125 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #126 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #127 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #128 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #129 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #130 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #131 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #132 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #133 0x00007ff80358be18 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be18) #134 0x00007ff8035c286b (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb286b) #135 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #136 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #137 0x00007ff80355b201 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x4b201) #138 0x00007ff803754f58 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x244f58) #139 0x00007ff80374b57d (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x23b57d) #140 0x00007ff89c5f7334 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\DLLs\_asyncio.pyd+0x7334) #141 0x00007ff89c5f6c7e (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\DLLs\_asyncio.pyd+0x6c7e) #142 0x00007ff89c5f7574 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\DLLs\_asyncio.pyd+0x7574) #143 0x00007ff80358cc79 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7cc79) #144 0x00007ff8037796b1 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x2696b1) #145 0x00007ff8037799c0 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x2699c0) #146 0x00007ff803578376 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x68376) #147 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #148 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #149 0x00007ff8035966ee (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x866ee) #150 0x00007ff80359103c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x8103c) #151 0x00007ff80358be6c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x7be6c) #152 0x00007ff8035c2815 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb2815) #153 0x00007ff8035c275f (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0xb275f) #154 0x00007ff80353304c (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x2304c) #155 0x00007ff803532ff2 (C:\Users\deluxa\AppData\Local\Programs\Python\Python312\python312.dll+0x22ff2) #156 0x00007ff8c28e37b0 (C:\Windows\System32\ucrtbase.dll+0x37b0) #157 0x00007ff8c40de8d7 (C:\Windows\System32\KERNEL32.DLL+0x2e8d7) #158 0x00007ff8c592c48c (C:\Windows\SYSTEM32\ntdll.dll+0x8c48c) Press any key to continue . . . ``` </details>
Author
Owner

@0xDELUXA commented on GitHub (Mar 19, 2026):

Workaround

diff --git a/comfy_kitchen/scaled_mm_v2.py b/comfy_kitchen/scaled_mm_v2.py
index 48473b0..796e4b6 100644
--- a/comfy_kitchen/scaled_mm_v2.py
+++ b/comfy_kitchen/scaled_mm_v2.py
@@ -5,7 +5,7 @@ from packaging import version

 _TORCH_VERSION = version.parse(torch.__version__.split("+")[0])  # Remove git hash suffix
 TORCH_2_10 = version.parse("2.10.0")
-_HAS_SCALED_MM_V2 = hasattr(torch.nn.functional, "scaled_mm")
+_HAS_SCALED_MM_V2 = hasattr(torch.nn.functional, "scaled_mm") and torch.version.hip is None

 if _HAS_SCALED_MM_V2:
     from torch.nn.functional import ScalingType, SwizzleType
@@ -64,6 +64,12 @@ def scaled_mm_v2(
             scale_a_for_mm = scale_a
             scale_b_for_mm = scale_b

+        # hipBLASLt only supports float8_e4m3fn, not fnuz (on RDNA4)
+        if input.dtype != torch.float8_e4m3fn and input.is_floating_point():
+            input = input.to(torch.float8_e4m3fn)
+        if weight.dtype != torch.float8_e4m3fn and weight.is_floating_point():
+            weight = weight.to(torch.float8_e4m3fn)
+
         output = torch._scaled_mm(
             input,
             weight,

This makes _HAS_SCALED_MM_V2 return False on ROCm regardless of whether scaled_mm exists, routing all FP8 matmuls through the else branch which uses torch._scaled_mm.

torch._scaled_mm with float8_e4m3fn works perfectly. Only _scaled_mm_v2 / torch.nn.functional.scaled_mm is broken.

<!-- gh-comment-id:4094424801 --> @0xDELUXA commented on GitHub (Mar 19, 2026): ### Workaround ```diff diff --git a/comfy_kitchen/scaled_mm_v2.py b/comfy_kitchen/scaled_mm_v2.py index 48473b0..796e4b6 100644 --- a/comfy_kitchen/scaled_mm_v2.py +++ b/comfy_kitchen/scaled_mm_v2.py @@ -5,7 +5,7 @@ from packaging import version _TORCH_VERSION = version.parse(torch.__version__.split("+")[0]) # Remove git hash suffix TORCH_2_10 = version.parse("2.10.0") -_HAS_SCALED_MM_V2 = hasattr(torch.nn.functional, "scaled_mm") +_HAS_SCALED_MM_V2 = hasattr(torch.nn.functional, "scaled_mm") and torch.version.hip is None if _HAS_SCALED_MM_V2: from torch.nn.functional import ScalingType, SwizzleType @@ -64,6 +64,12 @@ def scaled_mm_v2( scale_a_for_mm = scale_a scale_b_for_mm = scale_b + # hipBLASLt only supports float8_e4m3fn, not fnuz (on RDNA4) + if input.dtype != torch.float8_e4m3fn and input.is_floating_point(): + input = input.to(torch.float8_e4m3fn) + if weight.dtype != torch.float8_e4m3fn and weight.is_floating_point(): + weight = weight.to(torch.float8_e4m3fn) + output = torch._scaled_mm( input, weight, ``` This makes `_HAS_SCALED_MM_V2` return `False` on ROCm regardless of whether `scaled_mm` exists, routing all FP8 matmuls through the `else` branch which uses `torch._scaled_mm`. `torch._scaled_mm` with `float8_e4m3fn` works perfectly. Only `_scaled_mm_v2` / `torch.nn.functional.scaled_mm` is broken.
Author
Owner

@tvukovic-amd commented on GitHub (Apr 2, 2026):

https://github.com/pytorch/pytorch/pull/179138 solves this issue

<!-- gh-comment-id:4177829617 --> @tvukovic-amd commented on GitHub (Apr 2, 2026): https://github.com/pytorch/pytorch/pull/179138 solves this issue
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-kitchen#17
No description provided.