[GH-ISSUE #71] ComfyUI crashes using Flux Klein 9b with Triton backend - dequantize_nvfp4_kernel_tl #26

Open
opened 2026-10-26 22:19:18 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @waltercool on GitHub (Jul 10, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/71

Hi there,

As reported https://github.com/Comfy-Org/ComfyUI/issues/14510, ComfyUI crashes when rendering under the triton kernel.

The ComfyUI log is not much helpful, however, the MLIR dump blames dequantize_nvfp4_kernel_tl :

#di_subroutine_type = #llvm.di_subroutine_type<callingConvention = DW_CC_normal, types = #di_null_type, #di_derived_type, #di_derived_type1, #di_derived_type2, #di_derived_type2, #di_basic_type3, #di_basic_type3, #di_basic_type3, #di_basic_type3, #di_derived_type1, #di_derived_type1>
#di_subprogram = #llvm.di_subprogram<recId = distinct[0]<>, id = distinct[1]<>, compileUnit = #di_compile_unit, scope = #di_file, name = "dequantize_nvfp4_kernel_tl", linkageName = "dequantize_nvfp4_kernel_tl", file = #di_file, line = 418, scopeLine = 418, subprogramFlags = "Definition|Optimized", type = #di_subroutine_type>
#di_lexical_block_file = #llvm.di_lexical_block_file<scope = #di_subprogram, file = #di_file, discriminator = 0>
#loc133 = loc(fused<#di_subprogram>[#loc])
#loc134 = loc(fused<#di_lexical_block_file>[#loc97])
#loc135 = loc(fused<#di_lexical_block_file>[#loc98])
#loc136 = loc(fused<#di_lexical_block_file>[#loc99])
#loc137 = loc(fused<#di_lexical_block_file>[#loc100])
#loc138 = loc(fused<#di_lexical_block_file>[#loc101])
#loc139 = loc(fused<#di_lexical_block_file>[#loc102])
#loc140 = loc(fused<#di_lexical_block_file>[#loc103])
#loc141 = loc(fused<#di_lexical_block_file>[#loc104])
#loc142 = loc(fused<#di_lexical_block_file>[#loc105])
#loc143 = loc(fused<#di_lexical_block_file>[#loc106])
#loc144 = loc(fused<#di_lexical_block_file>[#loc107])
#loc145 = loc(fused<#di_lexical_block_file>[#loc108])
#loc146 = loc(fused<#di_lexical_block_file>[#loc109])
#loc147 = loc(fused<#di_lexical_block_file>[#loc110])
#loc148 = loc(fused<#di_lexical_block_file>[#loc111])
#loc149 = loc(fused<#di_lexical_block_file>[#loc112])
#loc150 = loc(fused<#di_lexical_block_file>[#loc113])
#loc151 = loc(fused<#di_lexical_block_file>[#loc114])
#loc152 = loc(callsite(#loc134 at #loc135))
#loc153 = loc(callsite(#loc136 at #loc135))
#loc154 = loc(callsite(#loc137 at #loc135))
#loc155 = loc(callsite(#loc138 at #loc135))
#loc156 = loc(callsite(#loc139 at #loc135))
#loc157 = loc(callsite(#loc140 at #loc135))
#loc158 = loc(callsite(#loc141 at #loc135))
#loc159 = loc(callsite(#loc142 at #loc135))
#loc160 = loc(callsite(#loc143 at #loc135))
#loc161 = loc(callsite(#loc144 at #loc135))
#loc162 = loc(callsite(#loc145 at #loc135))
#loc163 = loc(callsite(#loc146 at #loc135))
#loc164 = loc(callsite(#loc147 at #loc135))
#loc165 = loc(callsite(#loc148 at #loc135))
#loc166 = loc(callsite(#loc149 at #loc135))
#loc167 = loc(callsite(#loc150 at #loc135))
#loc168 = loc(callsite(#loc136 at #loc151))
#loc169 = loc(callsite(#loc138 at #loc151))
#loc170 = loc(callsite(#loc142 at #loc151))
#loc171 = loc(callsite(#loc144 at #loc151))
#loc172 = loc(callsite(#loc145 at #loc151))
#loc173 = loc(callsite(#loc147 at #loc151))
#loc174 = loc(callsite(#loc148 at #loc151))
#loc175 = loc(callsite(#loc149 at #loc151))
#loc176 = loc(callsite(#loc150 at #loc151))


error: couldn't allocate input reg for constraint 'r'

Triton version: 3.7.1
Comfyui version: 0.27.1
Comfyui kitchen version: 0.2.16
GPU: gfx1151
ROCm version: 7.2.0

Originally created by @waltercool on GitHub (Jul 10, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/71 Hi there, As reported https://github.com/Comfy-Org/ComfyUI/issues/14510, ComfyUI crashes when rendering under the triton kernel. The ComfyUI log is not much helpful, however, the MLIR dump blames dequantize_nvfp4_kernel_tl : ``` #di_subroutine_type = #llvm.di_subroutine_type<callingConvention = DW_CC_normal, types = #di_null_type, #di_derived_type, #di_derived_type1, #di_derived_type2, #di_derived_type2, #di_basic_type3, #di_basic_type3, #di_basic_type3, #di_basic_type3, #di_derived_type1, #di_derived_type1> #di_subprogram = #llvm.di_subprogram<recId = distinct[0]<>, id = distinct[1]<>, compileUnit = #di_compile_unit, scope = #di_file, name = "dequantize_nvfp4_kernel_tl", linkageName = "dequantize_nvfp4_kernel_tl", file = #di_file, line = 418, scopeLine = 418, subprogramFlags = "Definition|Optimized", type = #di_subroutine_type> #di_lexical_block_file = #llvm.di_lexical_block_file<scope = #di_subprogram, file = #di_file, discriminator = 0> #loc133 = loc(fused<#di_subprogram>[#loc]) #loc134 = loc(fused<#di_lexical_block_file>[#loc97]) #loc135 = loc(fused<#di_lexical_block_file>[#loc98]) #loc136 = loc(fused<#di_lexical_block_file>[#loc99]) #loc137 = loc(fused<#di_lexical_block_file>[#loc100]) #loc138 = loc(fused<#di_lexical_block_file>[#loc101]) #loc139 = loc(fused<#di_lexical_block_file>[#loc102]) #loc140 = loc(fused<#di_lexical_block_file>[#loc103]) #loc141 = loc(fused<#di_lexical_block_file>[#loc104]) #loc142 = loc(fused<#di_lexical_block_file>[#loc105]) #loc143 = loc(fused<#di_lexical_block_file>[#loc106]) #loc144 = loc(fused<#di_lexical_block_file>[#loc107]) #loc145 = loc(fused<#di_lexical_block_file>[#loc108]) #loc146 = loc(fused<#di_lexical_block_file>[#loc109]) #loc147 = loc(fused<#di_lexical_block_file>[#loc110]) #loc148 = loc(fused<#di_lexical_block_file>[#loc111]) #loc149 = loc(fused<#di_lexical_block_file>[#loc112]) #loc150 = loc(fused<#di_lexical_block_file>[#loc113]) #loc151 = loc(fused<#di_lexical_block_file>[#loc114]) #loc152 = loc(callsite(#loc134 at #loc135)) #loc153 = loc(callsite(#loc136 at #loc135)) #loc154 = loc(callsite(#loc137 at #loc135)) #loc155 = loc(callsite(#loc138 at #loc135)) #loc156 = loc(callsite(#loc139 at #loc135)) #loc157 = loc(callsite(#loc140 at #loc135)) #loc158 = loc(callsite(#loc141 at #loc135)) #loc159 = loc(callsite(#loc142 at #loc135)) #loc160 = loc(callsite(#loc143 at #loc135)) #loc161 = loc(callsite(#loc144 at #loc135)) #loc162 = loc(callsite(#loc145 at #loc135)) #loc163 = loc(callsite(#loc146 at #loc135)) #loc164 = loc(callsite(#loc147 at #loc135)) #loc165 = loc(callsite(#loc148 at #loc135)) #loc166 = loc(callsite(#loc149 at #loc135)) #loc167 = loc(callsite(#loc150 at #loc135)) #loc168 = loc(callsite(#loc136 at #loc151)) #loc169 = loc(callsite(#loc138 at #loc151)) #loc170 = loc(callsite(#loc142 at #loc151)) #loc171 = loc(callsite(#loc144 at #loc151)) #loc172 = loc(callsite(#loc145 at #loc151)) #loc173 = loc(callsite(#loc147 at #loc151)) #loc174 = loc(callsite(#loc148 at #loc151)) #loc175 = loc(callsite(#loc149 at #loc151)) #loc176 = loc(callsite(#loc150 at #loc151)) error: couldn't allocate input reg for constraint 'r' ``` Triton version: 3.7.1 Comfyui version: 0.27.1 Comfyui kitchen version: 0.2.16 GPU: gfx1151 ROCm version: 7.2.0
Author
Owner

@sleppyrobot commented on GitHub (Aug 4, 2026):

Can AMD users get a fix for this?
I merged the PR #47 that adds a check to the master and it did allow nvfp4 TE for miniH3 to work with enable-triton-backend. Its been broken for quite a long time

<!-- gh-comment-id:5177715945 --> @sleppyrobot commented on GitHub (Aug 4, 2026): Can AMD users get a fix for this? I merged the PR #47 that adds a check to the master and it did allow nvfp4 TE for miniH3 to work with enable-triton-backend. Its been broken for quite a long time
Author
Owner

@0xDELUXA commented on GitHub (Aug 11, 2026):

Triton is only a fallback now, use HIP instead.

<!-- gh-comment-id:5255248991 --> @0xDELUXA commented on GitHub (Aug 11, 2026): Triton is only a fallback now, use HIP instead.
Author
Owner

@waltercool commented on GitHub (Aug 11, 2026):

Are they killing the Triton backend? Damn, it's a bit faster than HIP.

I do understand most people feel Triton as a workaround than a solution for AMD cards.

<!-- gh-comment-id:5255708699 --> @waltercool commented on GitHub (Aug 11, 2026): Are they killing the Triton backend? Damn, it's a bit faster than HIP. I do understand most people feel Triton as a workaround than a solution for AMD cards.
Author
Owner

@0xDELUXA commented on GitHub (Aug 11, 2026):

Are they killing the Triton backend? Damn, it's a bit faster than HIP.

No, the Triton backend will continue to exist.

I do understand most people feel Triton as a workaround than a solution for AMD cards.

HIP is as native to AMD as CUDA is to NVIDIA, Triton is a fallback on both. It’s not just a matter of people considering it a workaround.

<!-- gh-comment-id:5256658518 --> @0xDELUXA commented on GitHub (Aug 11, 2026): > Are they killing the Triton backend? Damn, it's a bit faster than HIP. No, the Triton backend will continue to exist. > I do understand most people feel Triton as a workaround than a solution for AMD cards. HIP is as native to AMD as CUDA is to NVIDIA, Triton is a fallback on both. It’s not just a matter of people considering it a workaround.
Author
Owner

@sleppyrobot commented on GitHub (Aug 11, 2026):

Triton has been the best option for a long time, assuming hip can match it then people probably wont use it.

The performance mainly affects Krea2 but it requires either int8 custom node or merging #68 to get the speed up on a 7900xtx.
For example, starting comfy with
python main.py --disable-dynamic-vram --async-offload 2 --vram-headroom 0.5 --disable-api-nodes --use-flash-attention for the eager test
and for Triton am merging pr #68 and disabling hip export COMFY_KITCHEN_DISABLE_HIP=1 using native comfy loader.

I had KJ Patch Sol-Attn node in the H3 test, i know it uses Triton somewhat but i think it uses the package and not anything in comfy-kitchen.

Model backend settings best of 3 inference speed
Kea2-int8 hip + eager cfg>1, 1008x1440 4.83 s/it
Kea2-int8 hip + enable-triton cfg>1, 1008x1440 4.83 s/it
Kea2-int8 enable-triton + #68 + hip disabled cfg>1, 1008x1440 4.51 s/it (winner)
H3-int8 eager cfg=1, 832x480, 4sec 11.55 s/it
H3-int8 enable-triton cfg=1, 832x480, 4sec 10.86 s/it (winner)
H3-int8 enable-triton + #68 + hip disabled cfg=1, 832x480, 4sec 13.85 s/it
H3-w4a8 enable-triton + #68 cfg=1, 832x480, 4sec 12.12 s/it
H3-w4a8 enable-triton + #68 + hip disabled cfg=1, 832x480, 4sec 13.85 s/it

H3 + triton + hip disabled was slowest and I noticed lower GPU usage for the test, i did another test with w4w8 model + triton with hip enabled and disabled.
Also doing this test with enabled-dynamic-vram will likely give slight better performance as there appears to be a bit of offloading with the H3 model.

<!-- gh-comment-id:5256848363 --> @sleppyrobot commented on GitHub (Aug 11, 2026): Triton has been the best option for a long time, assuming hip can match it then people probably wont use it. The performance mainly affects Krea2 but it requires either int8 custom node or merging #68 to get the speed up on a 7900xtx. For example, starting comfy with `python main.py --disable-dynamic-vram --async-offload 2 --vram-headroom 0.5 --disable-api-nodes --use-flash-attention` for the eager test and for Triton am merging pr #68 and disabling hip export `COMFY_KITCHEN_DISABLE_HIP=1` using native comfy loader. _I had KJ Patch Sol-Attn node in the H3 test, i know it uses Triton somewhat but i think it uses the package and not anything in comfy-kitchen._ |Model|backend|settings|best of 3 inference speed| |---|---|---|---| |Kea2-int8|hip + eager|cfg>1, 1008x1440|4.83 s/it| |Kea2-int8|hip + enable-triton|cfg>1, 1008x1440|4.83 s/it| |Kea2-int8|enable-triton + #68 + hip disabled |cfg>1, 1008x1440|4.51 s/it (winner)| |H3-int8|eager|cfg=1, 832x480, 4sec|11.55 s/it| |H3-int8|enable-triton|cfg=1, 832x480, 4sec|10.86 s/it (winner)| |H3-int8|enable-triton + #68 + hip disabled |cfg=1, 832x480, 4sec|13.85 s/it| |H3-w4a8|enable-triton + #68|cfg=1, 832x480, 4sec|12.12 s/it| |H3-w4a8|enable-triton + #68 + hip disabled |cfg=1, 832x480, 4sec|13.85 s/it| H3 + triton + hip disabled was slowest and I noticed lower GPU usage for the test, i did another test with w4w8 model + triton with hip enabled and disabled. Also doing this test with enabled-dynamic-vram will likely give slight better performance as there appears to be a bit of offloading with the H3 model.
Author
Owner

@0xDELUXA commented on GitHub (Aug 11, 2026):

I'm not against improving the Triton backend on AMD at all. It's just that I'm not the person to decide which PRs to merge and which not to.

<!-- gh-comment-id:5256883236 --> @0xDELUXA commented on GitHub (Aug 11, 2026): I'm not against improving the Triton backend on AMD at all. It's just that I'm not the person to decide which PRs to merge and which not to.
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#26
No description provided.