Nodes/Pseudocomfy/String Variable
ComfyUI Node

String Variable

The one Pseudocomfy variable you'll actually use

By Pseudotools·Created 2 years ago·Updated 7 days ago· 4
String Variable
    • str
    val

    Of the three variable nodes in this pack - int, float, string - this is the one that's actually worth reaching for outside the Rhino pipeline. PseudoVarString ("String Variable") takes a block of text and passes it through unchanged, but the point is where that text lives: in a big, visible, multiline box with a name, instead of a cramped widget you'll spend ten minutes hunting for later.

    String plumbing is where ComfyUI workflows genuinely fall apart. Prompts get assembled from fragments - scene text, style text, negative text, tags pulled out of a conditional - and the pack's own processing nodes (PseudoProcessEnvironmentalPrompts, PseudoProcessMaterialPrompts, PseudoConcatStrings) all feed on strings. A named String Variable is the organizing layer: keep your scene description in one node, your style block in another, and let the concat/processing nodes pull from them. When the client changes the copy, you edit one visible box instead of untangling a chain of little inputs.

    It's also the variable the Pseudorandom plugin drives hardest. In the snapshot JSON that the Rhino plugin emits, the text fields - scene, style, negative, per-region material prompts - are strings, and this node is where those land in the graph. So if you're running the architectural pipeline this pack is built for, PseudoVarString isn't a convenience, it's a load-bearing part of the data flow.

    Inputs and outputs

    Entire schema, both halves:

    • val (STRING, multiline) - the text, default empty.
    • Output str (STRING) - the same text, passed through.

    That's it. The input is multiline by default, so long prompts and multi-line style blocks behave. Wire the output into any STRING input - prompts, wildcard processors, text concat nodes, the pack's processing nodes.

    Where it shines

    • Keeping prompt fragments readable: one node per concept, all visible, all labeled.
    • Feeding text into processing/concat chains that the pack's snapshot pipeline depends on.
    • Giving external automation a stable place to write text values on every run.

    For plain single-prompt work, a multiline text widget on your prompt node does the same job with less ceremony. Use this when the text is shared or reassembled - or when something external needs to reach it.

    Installation

    Standard Pseudocomfy install, both routes:

    # ComfyUI Manager: Custom Nodes Manager > search "Pseudocomfy" > Install
    
    # or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/Pseudotools/Pseudocomfy.git
    

    Restart ComfyUI after. Windows portable users should run the README's first step - .\python_embeded\python.exe -m pip install diffusers - since the pack's full regional pipeline depends on it.

    Troubleshooting

    • Multiline strings sometimes arrive with trailing newlines or whitespace that a downstream node doesn't trim. If a prompt node behaves oddly with a variable feed, check for a stray newline in val - that's almost always the culprit.
    • The console prints the whole string back on each run ([pseudocomfy] PseudoVarString: ...), which is a handy way to see exactly what text is being fed, whitespace and all.
    • Empty string by default. Wire it somewhere that treats empty as "use my own text" and you'll silently override with nothing - either give it content or don't wire it at all.

    Bottom line: if you're going to remember one variable node from this pack, make it this one. Ints and floats you can usually leave in their widgets; text is the thing that genuinely benefits from a named, visible home.

    CategoryPseudocomfy/Vars

    Inputs (1)

    NameTypeDefaultDescription
    valSTRING

    Outputs (1)

    NameTypeDescription
    strSTRING