Nodes/ComfyUI-Ascend-Int8-Test/Ascend INT8 Runtime Report
ComfyUI Node

Ascend INT8 Runtime Report

When INT8 silently didn't run, this node tells you

By Aucannot·Created 3 months ago·Updated 3 months ago· 0
Ascend INT8 Runtime Report
  • source
  • report
reset_after_reportfalse

The loaders in this pack default to auto_torch_npu_with_fallback, which is polite to a fault: it tries the real Ascend INT8 matmul, and if anything goes wrong it silently dequantizes and keeps going. Correct images every time, and no clue that your "INT8" run was actually fp32 the whole way. The Ascend INT8 Runtime Report is the honesty node that closes that gap.

Wire it after a loader - you have to connect its source input to something from the loader's output just to attach it to the graph - run, and it prints a live breakdown of what actually happened during the load and the forward pass:

  • linear_forward_calls and how many of those went through the real torch_npu_int8_calls
  • auto_fallback_dequant_calls (the silent safety net) and forced_dequant_calls (fallback-only backend)
  • weight_patch_dequant_calls, which is expected if you're applying LoRAs - patched weights dequantize by design in this pack
  • NaN/Inf counters on inputs and outputs, and a last_error field
  • the top 40 layers by call count, each with its own int8/fallback/dequant tally

How to read it: a healthy NPU run shows torch_npu_int8_calls dominating and auto_fallback_dequant_calls near zero. If the fallback count is huge, the op is failing for some layer on your hardware - and last_error usually names the layer and exception. If weight_patch_dequant_calls is high because you stacked LoRAs, that's not a bug, it's the documented trade-off: patches dequantize for correctness.

Mechanically it's a window onto a global stats dict that the pack's custom INT8 Linear bumps on every forward. Its IS_CHANGED returns float("NaN"), the always-rerun trick, so it never serves a cached report. The source input is typed * (ANY) - it reads nothing from the value you wire in; it's there purely to force ordering in the graph so the report runs after the loader. The reset_after_report boolean (off by default) wipes the counters once you've read them, which matters because the loaders already reset stats at load time when reset_runtime_stats is on. Between those two you can get a clean, per-run measurement.

Installing the pack is the same as its siblings - ComfyUI Manager (search "ComfyUI-Ascend-Int8-Test"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Aucannot/ComfyUI-Ascend-Int8-Test

then restart. No requirements.txt, no model downloads, just ComfyUI core plus torch_npu if you want the real INT8 path.

This is a validation plugin, not a production quantizer - the author says so in the README. On a non-Ascend machine (or one without torch_npu) everything still runs, but the report will honestly show dequant math everywhere. That's not a malfunction; it's the pack being upfront about the fact that your machine is doing none of the INT8 work. Which is, after all, the whole point of a runtime report.

Categoryascend/int8

Inputs (2)

NameTypeDefaultDescription
source*
reset_after_reportBOOLEANfalse

Outputs (1)

NameTypeDescription
reportSTRING