ComfyUI Node

Print Any

What is actually in that wire?

By yanhuifair·Created 2 years ago·Updated 3 months ago· 2
Print Any
  • input
    log

    ComfyUI is a black box until something goes wrong, and then you're staring at a wire wondering what's actually flowing through it. Print Any is the flashlight: plug anything into it and it dumps the value to the ComfyUI backend console - the terminal where you launched ComfyUI, not the browser. It accepts literally any type (*), prints the value, and gets out of your way.

    It's the debugging node from the plumbing layer, and for a beginner it's the fastest way to stop guessing. When a node isn't doing what you expect, stick Print Any on the wire right before it and watch what arrives. The output tells you the Python type and the value, which answers 80% of "why is my workflow doing this" questions on its own.

    Inputs and outputs

    • input (*) - anything. A string, an int, a tensor, a list, a model object.
    • log (STRING) - a free-text label that prints above the value, so you can tell your debug prints apart.

    No outputs. It's a terminal node - it consumes the wire and prints. It always runs, so you can't accidentally leave it bypassed-cached.

    How it works

    Three print() calls: the log label, the Python type of the input, then the value itself. A tensor prints its shape; a dict prints its keys and values; a string prints with quotes. You read it in the backend console - look for the log text among the ComfyUI startup and execution messages.

    Where it fits

    Debugging, full stop. Before troubleshooting forum threads, before screenshotting your graph - run the thing and read the wire. It's the same class of tool as Print Image in this pack, but for non-image values.

    Install

    FairLab, one pack: ComfyUI Manager (search ComfyUI-FairLab) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
    cd ComfyUI-FairLab
    pip install -r requirements.txt
    

    Restart, then look under Fair/utility. Zero extra dependencies.

    Gotchas

    • The output goes to the backend console, not the UI. If you're running ComfyUI in a Docker container, docker logs is where you'll find it; on a desktop install it's the terminal window.
    • It only prints what's on the wire at that moment. If the value is huge - a full image batch, say - the console gets very noisy, very fast. That's what the log label (and Print Image, which formats tensors more tersely) are for.
    • Since it always runs, leaving one on a hot wire forces that branch to execute every time. Fine for debugging, remove it before committing the workflow to a long batch.
    CategoryFair/utility

    Inputs (2)

    NameTypeDefaultDescription
    input*
    logSTRING

    Outputs (0)

    No outputs