快速结论:这个报错通常出现在 Apple Silicon(MPS)上运行 MiniMax H3 int8_convrot 文生视频模板时,模型 MLP 的 down-projection 走了 SwiGLU 融合路径 linear_input_act,绕开了 #16130 为无 torch._int_mm 设备添加的 _full_precision_mm 反量化回退,最终在第一个采样步直接落到 aten::_int_mm。优先确认你的 ComfyUI 是否已包含修复 linear_input_act 中 _full_precision_mm 判断的提交。
适用环境:已在 Apple Silicon Mac(M5 Max,48 GB,macOS 26.6.2)上复现;ComfyUI v0.35.1(含 313a76fb / #16130),torch 2.12.1,comfy-kitchen 0.2.33。Issue 确认在 MPS 上 supports_int8_compute(mps): False。未提供 Python 版本、CUDA 版本等信息。
最快修复方案:暂无确认的一步修复方案。Issue 中的修复思路是在 linear_input_act 的提前返回分支里补上 _full_precision_mm 判断,使其与 layer 的 forward 一样走反量化路径;该修复已在同层类型上验证可让调用返回 ok(shape (4, 16),max abs diff vs eager: 0.0),但尚未在真实 MiniMax H3 模板与完整 checkpoint 上确认。
注意事项:该修复会改变 int8 可用设备上的行为边界——Issue 提到新增了测试,确保在 int8 可用的设备上仍使用融合 kernel,避免为所有人关闭优化。因此在 MPS 之外的设备上不应因该修复而失去 int8 融合路径。由于缺少 MiniMax H3 的全部 checkpoint,真实模板上的端到端验证仍是缺口。
问题场景
用户在 Apple Silicon Mac 上使用 ComfyUI 运行官方 MiniMax H3 文生视频模板,加载以下模型文件:diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors、text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors、vae/minimax_h3_video_vae_fp16.safetensors、vae/minimax_h3_audio_vae_fp32.safetensors。文本编码器和 VAE 可以正常加载,但在 SamplerCustomAdvanced 执行到第 0/20 步时立即报错。用户已确认无自定义节点干扰(仅有内置的 websocket_image_save.py)。
报错原文
NotImplementedError: The operator 'aten::_int_mm' is not currently implemented for the MPS device.
comfy/ldm/minimax/model.py, line 210, in forward
return comfy.ops.linear_input_act(self.fc2, self.fc1(x), "swiglu")
comfy/ops.py, line 984, in linear_input_act
return quant_ops.ck.int8_linear(
comfy_kitchen/backends/eager/quantization.py, line 1028, in int8_linear
result = _int8_matmul_accumulate(x_8, weight.T.contiguous())
comfy_kitchen/backends/eager/quantization.py, line 754, in fast_int8_mm
return torch._int_mm(lhs, rhs)
启动日志中禁用逻辑本身是生效的,但融合路径没有遵循它:
Native ops: , emulated ops: asym_w4a8_int8, int8_tensorwise, float8_e4m3fn, convrot_w4a4, mxfp8, nvfp4, float8_e5m2
原因分析
#16130 在 MixedPrecisionOps.Linear.forward_comfy_cast_weights 中加入了 _full_precision_mm 反量化回退,用于在没有 torch._int_mm 的设备上禁用 int8 权重量化。
但 MiniMax H3 的 MLP 对 down-projection 不调用该层的 forward,而是调用 comfy.ops.linear_input_act(self.fc2, self.fc1(x), "swiglu")(comfy/ldm/minimax/model.py:210),把 SwiGLU 激活折叠进 int8 量化器。linear_input_act 只检查权重是否为 TensorWiseINT8Layout 的 QuantizedTensor,然后直接调用 quant_ops.ck.int8_linear(...),从不查询 linear._full_precision_mm,因此 #16130 的“禁用格式路由”被跳过,eager comfy_kitchen 后端最终进入 torch._int_mm。
traceback 也印证了这一点:同一 block 中的 fc1 可以正常运行(走的是已打补丁的 forward),失败发生在 fc2 的 linear_input_act 内。
环境排查
- 确认设备是否为 Apple Silicon / MPS。
- 确认操作系统与硬件(Issue 为 macOS 26.6.2、M5 Max、48 GB)。
- 确认 ComfyUI 版本(Issue 为 v0.35.1,包含 313a76fb / #16130)。
- 确认 torch 版本(Issue 为 2.12.1)。
- 确认 comfy-kitchen 版本(Issue 为 0.2.33)。
- 确认是否安装自定义节点;Issue 中已排除自定义节点影响。
- 确认启动日志中 emulated ops 是否包含
int8_tensorwise,以及 Native ops 是否为空。 - 确认所用 MiniMax H3 模板与模型文件是否为官方 Comfy-Org 版本。
解决步骤
- 确认当前 ComfyUI 是否已包含
linear_input_act中_full_precision_mm判断的修复提交;若没有,更新到包含该修复的版本。 - 在问题版本上,可先用 Issue 提供的最小复现脚本在 ComfyUI venv 内验证:构造
TensorWiseINT8Layout的Linear,设置lin._full_precision_mm = True,分别调用lin(...)和comfy.ops.linear_input_act(lin, x, "swiglu");修复前后者会抛NotImplementedError: aten::_int_mm。 - 若已打修复,再用同一脚本确认
linear_input_act返回正常结果(预期 ok,shape (4, 16),max abs diff vs eager: 0.0)。 - 最后加载官方 MiniMax H3 文生视频模板,使用默认设置 Queue prompt,观察
SamplerCustomAdvanced是否仍会在 step 0/20 报错。 - 如果仍失败,保留完整 traceback 与启动日志,确认失败点是否仍为
linear_input_act或已转移到其他 int8 调用路径。
验证方法
先用最小复现脚本确认 linear_input_act 不再触发 aten::_int_mm,且输出与 eager 路径一致(Issue 中测得 max abs diff vs eager 为 0.0)。然后在 MPS 上完整跑一次 MiniMax H3 文生视频模板:文本编码器、VAE 加载正常,SamplerCustomAdvanced 不再在 0/20 步抛 NotImplementedError,并能继续采样。由于 Issue 中修复者没有 MiniMax H3 checkpoint,真实模板上的端到端验证需要由能复现该模板的用户完成。
参考来源
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。
![[Bug][ROCm]: DeepSeek V4 accuracy drops with MRV2 on MI350/MI355 when FULL_DECODE_ONLY graph](https://www.chat-gpts.plus/wp-content/uploads/2026/09/52644-e5cd4f06-768x403.jpg)

