KfDebug_Int
The world's least glamorous, most reliable passthrough
- INT
There is nothing glamorous about KfDebug_Int. It takes an integer, prints it to your console, and hands it back. That's the entire job, and for a huge class of "why is my number wrong?" problems it's exactly the right tool. Integers are the quiet backbone of ComfyUI - frame counts, batch sizes, seeds, step numbers - and when one of them is off, you usually can't tell just by looking at a graph.
The one thing to know before you use it: the output goes to the terminal where ComfyUI runs, not to the canvas. Every KfDebug_* node works this way, and it trips people up every time. Wire an int in, glance at the node, see nothing, assume it's broken. It's not. The value is in your console, one line down from the label you gave it.
Why you'd reach for it
Two situations. First, "is this the integer I think it is?" - a batch size computed by some helper node, a frame index you're about to hand to an Evaluate node, a seed being passed through a chain of transforms. Second, and more common in this pack: you're building a keyframed animation and your frame math is off by one somewhere. KfDebug_Int on the wire of your t value will show you exactly what integer the graph is actually using at that point, which beats staring at four connected nodes and guessing.
The inputs that matter
item- theINTto inspect, force-input off a wire (you can't type a value in, by design).label- a multiline string, default"debugging passthrough". Give it a real name -"frame counter","batch n"- because that label is the only thing that makes the console output findable when several debug nodes are running.
The output is a single INT: the exact same value, unmodified. You can leave it in the middle of your graph and it changes nothing.
How it works
KfDebug_Int is KfDebug_Passthrough with RETURN_TYPES = ("INT",). The shared inspector logs the type, checks for dtype/shape (an int has neither), and prints the value - so you get roughly type: <class 'int'> and item: 37. Nothing more, because there's nothing more to an integer. It's the simplest node in this whole pack, and that's fine. Debug nodes don't need to be clever; they need to be there.
Installing it
Part of ComfyUI-Keyframed. ComfyUI Manager (search "Keyframed"), or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-Keyframed
Restart ComfyUI afterwards. The pack auto-installs keyframed and toolz on first load; no models involved.
Troubleshooting
The usual: nothing appears on the canvas - that's expected, check the terminal. If your console is a wall of log lines, the label is your grep key - make it distinct. And if the int you see isn't the one you expect, the debug node is not the liar; the thing producing the value is. Work backwards from there.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| item | INT | — | |
| label | STRING | debugging passthrough | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |