Nodes/ComfyUI-Keyframed/KfDebug_String
ComfyUI Node

KfDebug_String

Watch what your prompt actually becomes

By dmarx·Created 3 years ago·Updated 2 years ago· 92
KfDebug_String
    • STRING
    item
    labeldebugging passthrough

    Strings are the one debug case where the value actually matters, and KfDebug_String gives it to you verbatim. Every other KfDebug_* node is mostly confirming that something is on the wire; this one tells you exactly what text is on the wire, which is genuinely useful in a pack whose whole purpose is swapping prompts over time. When your prompt schedule hits frame 40, is the schedule actually emitting the prompt you wrote? This node answers that, in your console, in plain text.

    Same family rules as the rest: it logs to the terminal where ComfyUI runs, not to the canvas. Give it a label so you can find its output, and it hands the string back unchanged so your workflow keeps flowing.

    Why you'd reach for it

    Prompt debugging. If you're using the schedule nodes here - KfKeyframedCondition, KfGetScheduleConditionAtTime - to transition between several prompts across an animation, the most common failure is that the wrong prompt is active at the wrong time, or that a prompt is getting mangled in transit. Dropping KfDebug_String between your schedule output and the sampler tells you what conditioning text is actually being used, frame by frame. It's also handy for wildcard expansion or any node that transforms text before it hits the CLIP encoder.

    The inputs that matter

    • item - the STRING to inspect, force-input off a wire.
    • label - multiline string, default "debugging passthrough". When you're debugging three prompts at once, label them "prompt A", "prompt B", "prompt C" so the console lines don't blur together.

    Output: a single STRING - the identical text, passed through unmodified.

    How it works

    KfDebug_String is KfDebug_Passthrough with RETURN_TYPES = ("STRING",). The shared inspector logs the type, finds no dtype or shape on a plain string, and prints the value: item: <your prompt text>. That's it - simple, and all the more useful for it.

    Installing it

    Part of ComfyUI-Keyframed (dmarx's pack wrapping his keyframed library). ComfyUI Manager: search "Keyframed". Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dmarx/ComfyUI-Keyframed
    

    Restart ComfyUI. The pack auto-installs keyframed and toolz on first load; no models to download.

    Troubleshooting

    The standard family gotcha applies: nothing on the canvas - check the terminal. If the string you see isn't the string you wrote, the mangling is happening upstream of the debug node, so move it back a step and compare. And if you're using this to debug a prompt schedule, remember this pack's README says the first keyframe in a schedule should live at time 0 - schedules with no keyframe at 0 can evaluate to something unexpected at the start of the animation, and this node is how you'll spot it.

    Categorykeyframed/debug

    Inputs (2)

    NameTypeDefaultDescription
    itemSTRING
    labelSTRINGdebugging passthrough

    Outputs (1)

    NameTypeDescription
    STRINGSTRING