mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #253] Route INT8 linear_input_act through the int8_linear custom op #258
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#258
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/253
Author: @qweqweewqe7-create
Created: 10/17/2026
Status: 🔄 Open
Base:
main← Head:moss-int8-input-act-compile📝 Commits (1)
6a9c452Route INT8 linear_input_act through the int8_linear custom op📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
comfy_kitchen/tensor/int8.py(+6 -6)📄 Description
Summary
TensorWiseINT8Layout.linear_input_actcalledck.int8_lineardirectly. Its backend implementation hands raw pointers to the compiled extension, sotorch.compiletraced into it and failed on a FakeTensor__dlpack__:This shows up with ComfyUI's native MOSS-Image model, whose
ffn_downuseslinear_input_act(..., "situ"), under a per-block or whole-modeltorch.compile.linear_input_actnow callstorch.ops.comfy_kitchen.int8_linear, which already takesinput_act,input_act_weight,input_act_eps,residualandresidual_scale, the same way the plain linear path does. Eager behaviour and results are unchanged.Validation
RX 9070 XT (gfx1201) and RX 9060 XT (gfx1200), PyTorch
2.16.0a0+rocm10.2.0a20261015:torch.compile(block, fullgraph=True)per block (RX 9070 XT): fails without this change, passes with it.tests/test_int8.py tests/test_int8_input_act.py tests/test_int8_residual.pyand the HIP/ConvRot/adaln/rope test files on both GPUs: same results as unmodifiedmain. The only failures, 18 triton cases andtest_int8_linear_correctness[hip], fail identically onmainitself.Update: rebased onto v0.2.40
Rebased onto
main(f8b7e97, v0.2.40). The only conflict was the import block.import comfy_kitchen as ckis still unused after this change, and #259'sNoCapableBackendErrorimport is kept.Reproduction on RX 9070 XT (gfx1201) with PyTorch
2.16.0a0+rocm10.3.0a20261023:torch.compile(fullgraph=True)overTensorWiseINT8Layout.linear_input_act(..., input_act="situ"). The weight is a per-channel ConvRot 3072 x 8192, andxis 512 x 16384.mainstill fails, now on a tracedlogging.Loggercall insideck.int8_linear.Tests on RX 9070 XT and RX 9060 XT (
test_hip_wmma,test_hip_dispatch,test_gemm_bias_contract,test_int8*,test_adaln,test_rms_rope,test_int8_attention,test_sol_attn,test_convrot_unpacked_quantization,test_w4a8_mma,test_w6a8) show the same failures as unmodifiedmain: 18 triton rope cases andtest_int8_linear_correctness[hip].🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.