Nodes/comfyui-easy-randomize/Freezable String Combiner
ComfyUI Node

Freezable String Combiner

Ten prompt slots, freeze them one by one

By Ckrest·Created 8 months ago·Updated 4 months ago· 0
Freezable String Combiner
    • STRING
    text_1
    freeze_1false
    text_2
    freeze_2false
    text_3
    freeze_3false
    text_4
    freeze_4false
    text_5
    freeze_5false
    text_6
    freeze_6false
    text_7
    freeze_7false
    text_8
    freeze_8false
    text_9
    freeze_9false
    text_10
    freeze_10false
    separator,
    freeze_allfalse
    input_1
    input_2
    input_3
    input_4
    input_5
    input_6
    input_7
    input_8
    input_9
    input_10

    Freezable String Combiner is the pack's workhorse: up to ten text slots that each get their own freeze toggle, joined into one string on the way out. It's the node you build a whole prompt out of - subject in one slot, style in another, lighting in a third - and then freeze the parts you're happy with while the rest keep changing. If the pack's "Randomize → Preview → Freeze → Iterate" loop is the idea, this is where that loop physically happens.

    How it works

    Each slot has three moving parts. text_N is the widget - the value you see and the value that gets frozen. input_N is an optional wire input: connect a Random Selector or any other string output to it and it becomes the slot's live value. And freeze_N decides which one wins. Frozen means the widget value is used and the wire is ignored, even if it's connected. Unfrozen means the wire value is used - and if nothing is connected, the slot contributes nothing at all, which the docs call the "flush" behavior.

    That last detail matters more than it sounds. It means an unfrozen, unwired slot silently vanishes from the output rather than leaving an empty gap, so you can leave slots "open" for experiments and the combined string stays clean. There's also a global freeze_all toggle at the bottom that locks every slot at once, and a separator (default ", ") between the joined parts. The separator understands escape sequences, so type \n if you want a newline between slots.

    After each run, the pack's JS extension pushes the current values back into the text_N widgets - that's how you see what each live slot produced. The frozen values persist in the workflow JSON, so a locked prompt survives saving and reloading.

    The inputs that matter

    • text_N / freeze_N - the widget value and its lock, for slots 1 through 10.
    • input_N - the wire input for each slot; connect selectors here.
    • separator - ", " by default, accepts \n and \t.
    • freeze_all - lock everything in one click.

    Output is a single STRING - the fully combined prompt, ready for CLIP Text Encode.

    Gotchas

    When a slot is frozen, its widget is your source of truth, so the classic mistake is freezing a slot and then wondering why editing the connected selector does nothing. That's the feature - uncheck freeze_N to let the wire through again. And remember the flush behavior: a slot with no wire and no freeze contributes nothing, which is by design, but it can look like the node is "eating" text if you forget to connect something.

    How to install

    The pack is dependency-free - pure Python stdlib plus ComfyUI's own pieces, no models to download:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Ckrest/comfyui-easy-randomize.git
    

    Restart ComfyUI, or grab "comfyui-easy-randomize" from ComfyUI Manager. It registers under Local Custom/Utilities (not "Easy Randomize" as the README claims). Note the JS extension adds spacer rows between slots for readability - if widgets ever look crowded or the layout feels off, that's this pack's doing.

    Where it fits

    The power move is wiring each slot's input_N to a different Random Selector and freezing selectively: subject frozen, style frozen, lighting still rolling. You get the "change one variable at a time" discipline the community constantly preaches - but the variable you're changing is a whole prompt slot, and you never retype anything. For a single-slot version, the pack's Freezable Input node does the same trick with less ceremony.

    CategoryLocal Custom/Utilities

    Inputs (32)

    NameTypeDefaultDescription
    text_1STRING
    freeze_1BOOLEANfalse
    text_2STRING
    freeze_2BOOLEANfalse
    text_3STRING
    freeze_3BOOLEANfalse
    text_4STRING
    freeze_4BOOLEANfalse
    text_5STRING
    freeze_5BOOLEANfalse
    text_6STRING
    freeze_6BOOLEANfalse
    text_7STRING
    freeze_7BOOLEANfalse
    text_8STRING
    freeze_8BOOLEANfalse
    text_9STRING
    freeze_9BOOLEANfalse
    text_10STRING
    freeze_10BOOLEANfalse
    separatorSTRING,
    freeze_allBOOLEANfalse
    input_1optSTRING
    input_2optSTRING
    input_3optSTRING
    input_4optSTRING
    input_5optSTRING
    input_6optSTRING
    input_7optSTRING
    input_8optSTRING
    input_9optSTRING
    input_10optSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING