Nodes/ComfyUI-Shinsplat/String Interpolated (Shinsplat)
ComfyUI Node

String Interpolated (Shinsplat)

A prompt text node with dynamic prompts built in and an END directive for quick tests

By Shinsplat·Created 2 years ago·Updated about a year ago· 47
String Interpolated (Shinsplat)
    • STRING
    text

    Sometimes the difference between a "text node" and a "prompt node" matters. The stock ComfyUI text nodes are plain strings - no dynamic prompts, no directives. This one turns a single text input into a STRING output with two additions the author wanted and the built-ins didn't have: dynamic prompt expansion (so {red|blue|green} wildcards actually randomize) and the pack's uppercase END directive, which drops everything after it when the prompt is processed.

    How it works

    The mechanism is intentionally thin: text in, text out, with dynamic-prompt evaluation enabled on the input and END honored as a truncation marker. The END bit is the sleeper feature - when you're testing a long prompt and want to see what just the first sentence does, put END after it and everything past that word vanishes from the output, no commenting out required. It's the same directive the pack's encoders honor, so the mental model carries over. Wire the STRING output into a text encoder (this pack's Clip Text Encode or any other), a filename node, or anything that eats text.

    The inputs and outputs

    • text - your string, with dynamic-prompt wildcards and an optional END truncator.
    • Output: STRING - the interpolated/truncated text.

    How to install it

    Included in ComfyUI-Shinsplat:

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

    or ComfyUI Manager → "ComfyUI-Shinsplat" → restart. No extra deps.

    Common issues

    • "Wildcards aren't randomizing" - {a|b} syntax is dynamic-prompts style, and the node handles one expansion pass; if you're feeding its output into a node that re-tokenizes with dynamic prompts disabled, the result can look static. Confirm the downstream node isn't stripping what this node already resolved.
    • END on a literal prompt - the word is case-sensitive and uppercase; if you actually want "the end" in your text, don't capitalize it.
    • It's one output - this node doesn't filter comments or do Variables-style $NAME substitution (that's the separate Variables node). Keep the jobs separate.
    Categoryadvanced/Shinsplat

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING