ComfyUI Node

Set String

Name a text value once, reuse it across every config

By haroonaslam·Created 4 months ago·Updated 7 days ago· 10
Set String
      key
      value

      Text sneaks into every workflow in a dozen places - a filename prefix, a model name, a tag you paste into two different prompt boxes. Set String is WorkflowX's way of making that text a single, named value instead of a thing you retype. Give it a key, give it a string, and any Get String with the same key hands that text to wherever it's needed.

      And yes, like every node in the Set family, it has no output. The publish-vs-deliver split can look like a bug the first time you stare at an input-only node, but it's the whole design: Set String writes value under key into WorkflowX's config state, and the matching Get String reads it back. If you want the value to also keep traveling on the same wire, you'd reach for Set Relay instead - different job, same family.

      What it's actually for

      Two things, and they stack:

      1. One source, many consumers. The same model filename feeding a loader, a filename prefix node, and a note to yourself, all resolved from one typed value. That's the classic primitive-node job, done with a name instead of a socket.
      2. Config-scoped switching. This is the part a plain PrimitiveString can't do. WorkflowX's Config SelectorX scopes Set/Get resolution to native groups, so a "Draft" config can publish prefix="test_" and a "Final" config can publish prefix="final_" under the same key. Flip the config, and every consumer sees the new string.

      Inputs, the entire surface:

      • key (STRING) - the name. Empty keys are rejected.
      • value (STRING) - the text. Single-line; if you need paragraphs, use Set Text.

      Install and wire it

      The pack installs as one unit:

      cd ComfyUI/custom_nodes
      git clone https://github.com/haroonaslam/WorkflowX-Configurator
      

      Or search WorkflowX Configurator in ComfyUI Manager, then restart ComfyUI and refresh the browser. No dependencies, no downloads.

      Place Set String inside a native group, add a Get String with the same key wherever the text should land, and convert the target widget to an input if it isn't one already. If a value must change with your workflow's active config, give the group a name and assign it in Config SelectorX.

      Common gotchas

      • Case-sensitive keys. model and Model are two different values. Pick a naming scheme and stick to it.
      • Set Text vs Set String. If your multiline text isn't saving, you grabbed the wrong node - Set String is deliberately single-line.
      • Get errors with nothing to resolve. A Get String with no matching Set String in the active config's scope raises an error rather than silently returning empty, which is honestly the better failure mode - it tells you the wiring is broken instead of feeding a blank string into a filename.

      Small, quiet, and useful. If you're already buying into WorkflowX's config system, this is one of the first nodes you'll reach for.

      CategoryWorkflowX/Get Set Go

      Inputs (2)

      NameTypeDefaultDescription
      keySTRING
      valueSTRING

      Outputs (0)

      No outputs