Nodes/ComfyUI Functional/[Internal] Inspect Impl
ComfyUI Node

[Internal] Inspect Impl

The machinery behind Inspect

By Duanyll·Created 11 months ago·Updated 4 months ago· 2
[Internal] Inspect Impl
  • signal
  • value
  • *
  • *
body

This is what the Inspect node turns into the moment your workflow starts executing. You should never place [Internal] Inspect Impl by hand - it's the implementation detail that makes Inspect's lazy, non-eager debugging work. If you're seeing it in the node list or a workflow JSON and wondering whether you're supposed to use it, you're not: it's ComfyUI Functional's plumbing, exposed to the executor but not meant for your canvas.

Here's the story. When you drop an Inspect, connect a value to it, and hang an Output node off the second output, the pack's pre-processing step (_preprocess_inspect_nodes in transform.py) finds that Output leaf - on the condition it's connected only to Inspect's value socket - absorbs it, and rewrites the Inspect into this node. The absorbed Output node's definition gets serialized as JSON into the body input. So the user-facing Inspect is effectively a placeholder that gets "compiled" into InspectImpl at run time.

Inputs:

  • signal - the ordering token, passed through untouched.
  • value - the probed value.
  • body - a multiline STRING holding the JSON of the leaf Output node it absorbed.
  • ComfyUI also passes the node's own id through a hidden input so the expanded subgraph gets consistent ids - you never set this by hand.

Outputs: two wildcard sockets - signal out (0) and the value (1).

The run method is where the magic happens. It creates an __InspectPassthru__ relay node, then splices the body subgraph back in with override_display_id set, so the UI still shows the original node ids rather than the mangled internal ones. References to __value inside the body get rewired to the passthru's value output. The result is returned via ComfyUI's expand mechanism - the same graph-injection trick the pack uses for function calls.

So why should a normal user care about any of this? Two reasons. First, it explains that confusing ExecutionBlocker error: the transform only absorbs a leaf that is directly and exclusively connected to Inspect's second output, which is why that constraint is so rigid. Second, knowing this is generated code means you shouldn't try to hand-edit it in a workflow JSON - any manual wiring is more likely to break the pre-processor than help.

Install

Nothing special - it ships with the pack:

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

then restart ComfyUI (or install via Manager, searching Duanyll/comfyui_functional). No models, no pip dependencies. If this node appears in your graph without you having placed it, that's normal - Inspect compiled into it. If you never use Inspect, you'll likely never meet it.

Categoryduanyll/functional/internal

Inputs (3)

NameTypeDefaultDescription
signal*
value*
bodySTRING

Outputs (2)

NameTypeDescription
**
**