Nodes/ComfyUI-QING/单路日志丨调试
ComfyUI Node

单路日志丨调试

The fastest way to see what's actually flowing through a wire

By sheengoa·Created about a year ago·Updated 20 days ago· 16
单路日志丨调试
  • source
  • source
title快速日志
label变量
levelINFO
include_timestamptrue
include_counterfalse
show_typetrue
show_shapetrue
print_emptyfalse

ComfyUI hides everything behind node sockets, and half of debugging is just finding out what type and shape is actually on a wire. QuickLogPrinter is the QING pack's answer to "what's coming out of this node?" - it prints one value to the terminal in a structured, readable form and passes it through untouched. Drop it inline, read the console, move on. It's the single-input sibling of the pack's four-input LogPrinter, and it's the one you'll actually sprinkle through a graph while something misbehaves.

What it does

Inputs: title (a label for the log block, default "快速日志"), label (the per-value name, default "变量"), level (INFO / WARN / ERROR / DEBUG), and four formatting toggles - include_timestamp, include_counter (a running execution counter so you can see repeated calls), show_type (default true, prints the Python type), show_shape (default true, prints tensor shapes - the one you actually care about when an image comes out the wrong dimensions), and print_empty (whether to log None values; default false, so empty sources are skipped). The optional source input is any type - *.

Output: source again, unchanged. The node is transparent; it's a wiretap, not a transform.

Mechanically it uses the pack's shared log-printer core: it formats the value (strings get truncated to 300 chars and shown as repr, tensors get type+shape, dicts/lists get a readable dump), prints a header plus the entry to stdout with flush=True, and returns the input verbatim.

Where you'd reach for it

The classic move: suspect a node is outputting None or the wrong shape, drop QuickLogPrinter right after it, run, and read the terminal. A shape like [B,H,W] when you expected [B,H,W,C] explains most mask/image mismatch bugs instantly. In a loop, turn on include_counter and you can watch the node fire N times with each value. Because it passes through, you can leave it in the graph without breaking anything - just remember it's still printing to your console.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/GAO-SHIQING/ComfyUI-QING
cd ComfyUI-QING
python install_dependencies.py

Restart ComfyUI after. Pure stdlib + optional torch introspection, no dependencies. Manager: search "ComfyUI-QING." (README's GAOSHI-QING clone-URL typo - the repo is GAO-SHIQING/ComfyUI-QING.)

Things to know

It logs to the terminal running ComfyUI, not the canvas. If you're on a hosted/remote ComfyUI and can't see stdout, this node's output is invisible - use a text-preview node in that case. And remember the caching behavior: if the upstream node is cached and doesn't re-run, the log printer may not fire on every execution either - include_counter will show you the truth. One more habit worth having: with print_empty off (default), a None source prints "无可打印变量" (nothing to print) rather than an error - which is itself useful information, it means the wire really is empty.

CategoryQING/调试工具

Inputs (9)

NameTypeDefaultDescription
titleSTRING快速日志
labelSTRING变量
levelCOMBOINFO4 options: INFO, WARN, ERROR, DEBUG
include_timestampBOOLEANtrue
include_counterBOOLEANfalse
show_typeBOOLEANtrue
show_shapeBOOLEANtrue
print_emptyBOOLEANfalse
sourceopt*

Outputs (1)

NameTypeDescription
source*