Nodes/Mikey Nodes/Text Preserve (Mikey)
ComfyUI Node

Text Preserve (Mikey)

Text Preserve (Mikey) — ComfyUI Node

By bash-j·Created 3 years ago·Updated 11 months ago· 188
Text Preserve (Mikey)
    • text
    textInput Text Here
    result_textResult Text Here (will be replaced)

    This one's undocumented in the README beyond being listed alongside TextConcat and RemoveTextBetween as a text-manipulation node, but the schema gives away exactly what kind of node it is: it's marked as an output node, and its second field is literally pre-filled with the placeholder "Result Text Here (will be replaced)." That phrasing is the tell - this node writes its real, resolved output back into its own widget so you can see it sitting right there in the graph.

    What that actually gets you

    If you've got a prompt that flows through wildcards, an LLM prompt-enhancement node, or several rounds of SearchAndReplace and TextCombinations before it reaches your sampler, you eventually lose visibility into exactly what text is going into your CLIP encoder on any given run - especially once randomness is involved. TextPreserve sits at the end (or middle) of that chain, takes whatever text arrives, and displays it directly in its own node body via result_text, updating every time you run the graph. It's the difference between "I think this is roughly what got generated" and actually being able to read the exact string that produced a given image, without opening the image's metadata or digging through a log.

    Because it's marked as an output node rather than a pure pass-through, it's meant to be a visible checkpoint in your graph - a place you can glance at mid-generation to sanity-check your prompt actually resolved the way you expected, before the run finishes.

    Inputs and output

    • text - the incoming string you want to preserve/display, multiline.
    • result_text - a second multiline field that starts as placeholder text and gets overwritten with the actual resolved value once the node runs.

    It outputs a single text string - so you can also chain it into further nodes downstream if you want the display checkpoint without breaking your pipeline.

    Installing it

    Via ComfyUI Manager, search "Mikey Nodes." Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bash-j/mikey_nodes
    

    Restart ComfyUI. No dependencies or model files - it's a display/pass-through node.

    Things to know before relying on it

    Since this isn't documented individually in the pack's README, treat the "why" here as a reasonable read of the schema rather than bash-j's own words - the mechanics (single text in, a result field that gets overwritten, output-node status) are what the JSON actually shows, and that combination is the standard ComfyUI pattern for "show me what really happened here," not a guess pulled from nowhere.

    If you're chaining several of these through a complex wildcard-and-combination pipeline to debug where a prompt goes wrong, place one after each major processing step rather than just at the very end - that way when something looks off in your final image, you can trace exactly which stage introduced the unexpected text instead of re-running the whole graph with pieces disconnected one at a time.

    CategoryMikey/Text

    Inputs (2)

    NameTypeDefaultDescription
    textSTRINGInput Text Here
    result_textSTRINGResult Text Here (will be replaced)

    Outputs (1)

    NameTypeDescription
    textSTRING