Comfy-Org / Comfy-Org/comfy-kitchen

ComfyUI crashes using Flux Klein 9b with Triton backend - dequantize_nvfp4_kernel_tl

Open
#71 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
220
Forks
91
Avg merge
1d 7h
Merged PRs (30d)
12

Description

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
#di_subprogram = #llvm.di_subprogram, 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
#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

Contributor guide

Open the contributing guide

Research direction

Start by locating the dequantize_nvfp4_kernel_tl entry point, identified at line 418 in the MLIR dump, and inspect how the Triton backend reaches it. Reproduce the Flux Klein 9b render on gfx1151 with Triton 3.7.1, ComfyUI 0.27.1, and ROCm 7.2.0, then compare the generated MLIR and register-allocation failure. Done means the render no longer crashes or the unsupported configuration is handled clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.