Nodes/ComfyUI-ViewData/View Data ~πŸ…–
ComfyUI Node

View Data ~πŸ…–

The ComfyUI debug node that finally shows you what's inside your graph

By gremlationΒ·Created 2 years agoΒ·Updated about a year agoΒ· 2
View Data ~πŸ…–
  • input

    ComfyUI is great at showing you pictures and genuinely terrible at showing you data. Wire a conditioning to the wrong node and the graph won't complain - it just quietly runs with whatever you handed it, which is why half of all "why is my output garbage" threads end with someone realizing a string got passed where a tensor belonged. View Data ~πŸ…– (the πŸ…– is Gremlation's little signature, you'll see it on a few of their nodes) is the fix: a dead-simple terminal node that prints the type and contents of anything you connect to it.

    What it actually does

    It's an output node, meaning nothing comes out the other side - it's a dead end you drop into the middle of a graph to peek, then delete. What you get instead is a read-only panel rendered on the node itself: a small chip showing the Python type of the input, plus a syntax-highlighted, multi-line text box with the value.

    That's more useful than it sounds. Wire it to the conditioning output of a CLIP text encode and you'll see the [{'pooled_output': <Tensor[...]>}] dict structure that conditioning actually is. Hook it after a loader and you'll see the metadata dict it carries. Connect a prompt string and you'll see exactly what the node upstream is really emitting - including that it's a dict when you expected a string, which is the cause of a lot of "my prompt does nothing" confusion.

    How it works

    The Python side is minimal, which is the point. The single input is typed as IO.ANY - anything goes, so it's safe to hang off any output. At execute time it grabs type(input).__name__ for the chip, then recursively JSON-serializes the value. The two cases worth knowing: a torch Tensor becomes <Tensor[shape]> (you get the shape, not a wall of numbers - the one genuinely smart choice this node makes), and anything else that won't serialize becomes <Unserializable object> instead of crashing your queue.

    The real work happens in the browser. The bundled frontend hands the value to Prettier to pretty-print dicts as JSON (the indentation is configurable), Prism does the syntax highlighting in JSON for dicts and Python for tensors, and the whole thing follows ComfyUI's light/dark theme. Dependencies are effectively zero: the requirements.txt is empty and the only declared dependency is torch, which you already have if ComfyUI runs at all. No model downloads, no keys.

    The input that matters

    There's exactly one, and you'll rarely touch it:

    • input (*, any type) - what to inspect. It defaults to your current node selection when you add the node, so most of the time you just right-click β†’ Add Node β†’ search "View Data" and it's already wired to whatever you had highlighted.

    Installing it

    Any of the usual routes, all of which just clone the repo into custom_nodes and restart ComfyUI:

    cd ComfyUI/custom_nodes
    git clone https://github.com/gremlation/ComfyUI-ViewData
    

    Or use ComfyUI Manager (search "ComfyUI-ViewData" in Custom Nodes Manager), or comfy node install comfyui-viewdata if you use Comfy-CLI. Restart after, as always.

    Where people get burned

    The one real trap is case-sensitivity, and it's documented right in the README: the frontend loads its styles from lowercase paths (extensions/comfyui-viewdata/...), so on case-sensitive filesystems - Linux, basically - the node still works but the panel comes up unformatted, no syntax highlighting, no pretty JSON. If that's you, rename the folder:

    mv ComfyUI/custom_nodes/ComfyUI-ViewData ComfyUI/custom_nodes/comfyui-viewdata
    

    then restart. Windows and macOS default to case-insensitive and won't hit this.

    It's a thin tool and it knows it - but when a workflow silently misbehaves and you want to debug one variable at a time instead of guessing, this is the fastest way to see what's actually in the pipe. There are fancier inspector nodes, but this one does the one job with no dependencies and no setup.

    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    input*β€”

    Outputs (0)

    No outputs