ComfyUI Node

Inspect

Peek inside a ComfyUI function without breaking the graph

By Duanyll·Created 11 months ago·Updated 4 months ago· 2
Inspect
  • signal
  • value
  • *
  • *

Inspect is the debug tool for ComfyUI Functional, and the one node from this pack you'll use most in the first hour of fighting your own workflow. When you've wrapped a chunk of your graph into a function and something comes out wrong, you want to look at an intermediate value without having to rewire the whole thing or force a branch to evaluate. Inspect is that wiretap: it reads any value in the middle of a function body and shows it to you, without eagerly evaluating the branch at graph-build time.

The key trick is that it's lazy. Inspect only runs when its signal output is actually consumed somewhere downstream. Chain the signal port through the nodes you care about, hang the value you're curious about off the second output, and it fires exactly when that point of the pipeline would naturally execute. That's why the README tells you to use it liberally inside conditionals - it prevents ComfyUI from rendering both branches of an IfCondition when only one should run.

Inputs - just two, both "any type":

  • signal - any value; it's not used for its data, only to enforce execution order.
  • value - the thing you actually want to inspect.

Outputs - two wildcard sockets:

  • Output 0 passes signal through, so you can keep the chain going.
  • Output 1 is the value, which you connect to a preview/Output node to actually see it.

That second output has a rule you'll hit with a confusing error if you break it: it must connect directly to an Output node, with nothing in between, and that Output node can't feed anything else. Violate it and the node returns an ExecutionBlocker that spells the whole constraint out for you. The reason is mechanical: at execution time the transform step absorbs that leaf Output node into the Inspect's internals so it doesn't evaluate early (see the [Internal] Inspect Impl and Inspect Passthru pages if you want the gory detail).

Install

Everything comes from the one pack:

cd ComfyUI/custom_nodes && git clone https://github.com/Duanyll/comfyui_functional

then restart ComfyUI. Or search Duanyll/comfyui_functional in ComfyUI Manager. No model downloads, no pip dependencies - the whole pack is pure Python. Do install Basic Data Handling too: the functional nodes want LIST values, not ComfyUI's built-in Data List sockets, and passing the wrong one can hang the graph.

Gotchas

  • Stale output. If nothing depends on Inspect's signal, it never executes - that's by design, but it looks like the node is broken. Make sure something downstream consumes the signal.
  • Blinking too fast to read. In a fast loop the preview flashes past. Drop a Sleep node after the signal and give yourself a second to look.
  • Side effects kill the cache. This pack disables ComfyUI's caching when it detects side effects, so reruns with Inspect in the graph will be slower than the pure-function equivalent. That's the price of honest debugging.

The pack itself is young and leans on hacked-up ComfyUI internals (scheduler hooks, coroutine runners, cache invalidation) - the author says so straight in the README. Works fine for fiddling, but don't bet your production pipeline on it yet, and re-test after every ComfyUI update.

Categoryduanyll/functional/side_effects

Inputs (2)

NameTypeDefaultDescription
signal*
value*

Outputs (2)

NameTypeDescription
**
**