ComfyUI Node

WP Debug

Finally, You Can See What the Wildcards Actually Picked

By DumiFlex·Created 5 months ago·Updated 19 days ago· 9
WP Debug
  • context
  • wp_viewer

    Wildcard pipelines are a black box right up until they aren't, and the moment they stop working you need WP Debug. It's a terminal inspector: wire any PIPELINE_CONTEXT into it, and after Generate it fills a tabbed panel with exactly what flowed through that point in the chain. It has no outputs - it's an end-of-line node whose only job is showing you the truth. If you're building any non-trivial wildcard workflow, you should have one of these hanging off your main context before you even start troubleshooting.

    How it works

    One required input, context (PIPELINE_CONTEXT), plus a socketless wp_viewer widget that binds the panel. The node is a pure inspector: it flattens the context payload into a JSON snapshot and pushes it to the UI. After a run you get four tabs:

    • Snapshot - the final $variable → value map. This is the "what did it decide" view.
    • Trace - a per-module execution log: what each module ran, what it wrote, and where its seed came from. This is the "why did it decide that" view.
    • Picks - which wildcard option was picked, its weight, and its sub-category. Great for spotting a weight imbalance where one option wins 90% of the time.
    • Warnings - runtime warnings like "constraint never fired" or "missing variable." This tab is worth its weight in gold, because the engine is deliberately lenient - missing vars and silent constraint failures don't crash, they warn.

    Because it's a terminal node with no outputs, you can drop it anywhere in a chain without changing behavior: wire one after the injector, one after the loop, one after the context - each shows you that stage's snapshot. That's the real power: you can bisect a broken chain by comparing what each stage resolved.

    Why you'll reach for it

    ComfyUI's stock debugging story is "read the console, hope the node logged something." This is better because the failure modes of a wildcard pipeline are semantic, not crash-based - a constraint that never fires, a derivation rule that picks the ELSE branch every time, a variable that comes through literal because it was never defined. None of those error out; they produce quietly wrong prompts. WP Debug turns "the prompt looks wrong" into "iteration 3's $mood is 'gloomy' but the constraint for 'gloomy' never fired, here's the warning." That's the difference between guessing and debugging.

    It's also how you learn the system: the Trace tab shows you how the seed propagated through each module, which is the fastest way to understand locked-seed modules and why some picks are reproducible and others aren't. The engine's warning list - constraint never fired, unknown wildcard ref, missing variable - is the closest thing the pack has to a diagnostic manual, and it's all surfaced here.

    Install

    Part of the pack: ComfyUI Manager → Wildcard Pipeline → install, or the manual git clone + pip install -e . + pnpm build path. Needs ComfyUI ≥ 0.3.36, no model downloads. The Debug node itself is dead simple - if the panel isn't showing anything, the usual culprit is wiring the context into a node that produces no context output, or the workflow running on an older ComfyUI that doesn't support the node's V3 schema. Check the console log; "Unknown wildcard ref" warnings are expected on workflows where the module library isn't fully embedded, and they'll show up here first.

    Categorywildcard-pipeline

    Inputs (2)

    NameTypeDefaultDescription
    contextPIPELINE_CONTEXTThe resolved $variable context from any upstream WP Context / Loop / Injector chain. Required — without it the node has nothing to inspect.
    wp_viewerWP_DEBUG_VIEWER

    Outputs (0)

    No outputs