Nodes/WAS Node Suite v3/CLIPTextEncode (NSP)
ComfyUI Node Runs on cloud

CLIPTextEncode (NSP)

A drop-in text encoder that also rolls the dice

By WASasquatch·Created 3 years ago·Updated 2 days ago· 1,843
CLIPTextEncode (NSP)
  • clip
  • conditioning
  • parsed_text
  • raw_text
mode
noodle_key__
seed0
text

NSP stands for Noodle Soup Prompts - an A1111-era community project that packaged up a big library of prompt fragments (styles, adjectives, subjects, and so on) that you could pull from at random instead of hand-writing every descriptive word yourself. This node is WAS's take on a CLIPTextEncode that, before it does the normal job of turning text into conditioning, first runs your prompt through that pantry - plus A1111-style wildcard files and a couple of its own tricks.

What it does beyond the standard encoder

Underneath, it's still a text-to-conditioning node: wire in your CLIP and your prompt text, get conditioning out, plug that into your KSampler exactly like the core CLIPTextEncode. The difference is everything it does to the text before encoding it:

  • NSP tags pull randomized flavor text from the built-in pantry, so instead of typing out a long string of style adjectives yourself, you drop in a tag and get a randomized one back.
  • A1111-style wildcards - __filename__ syntax, including subdirectories like __appearance/haircolour__ - pull a random line out of a matching text file. By default the pack looks in a /wildcards folder at its own root, but you can point wildcards_path in was_suite_config.json at an existing Automatic1111 wildcards folder if you already have one built up.
  • <option1|option2|option3> syntax picks one option at random, inline, no separate wildcard file needed.
  • $|prompt words|$ variables let you tag a phrase once and reuse it later in the same prompt by number - the first tagged phrase becomes $1, the second $2, and so on.

All of it respects the node's seed input, so re-running with the same seed reproduces the exact same expansion instead of re-rolling every time - the randomness is deterministic, not truly random, which matters if you're iterating on a prompt and don't want the wildcards drifting under you between tweaks.

Worth knowing before you dive in

The wildcard syntax this node speaks (__file__, {a|b|c}-style random choice) is genuinely old - it's A1111-era convention that a lot of people who arrived in ComfyUI more recently have simply never encountered. Budget a few minutes to get comfortable with the format before you expect it to feel natural.

It's also worth knowing you may already have some of this covered: Impact Pack - a much more actively maintained pack, and one most serious ComfyUI users already have installed for FaceDetailer - ships its own __wildcard__ and {a|b|c} dynamic-prompt syntax that a large share of shared workflows quietly depend on. If you already have Impact Pack in your setup, check whether it already gives you the randomized-prompt behavior you're after before installing all of WAS Node Suite just for this one node.

Installing it

Part of the full WAS Node Suite pack:

  • ComfyUI Manager - search WAS Node Suite, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, then pip install -r requirements.txt from inside that folder, then restart ComfyUI.

Common issues

If your wildcards aren't resolving, check was_suite_config.json - a wrong or unset wildcards_path is the usual culprit, and Windows paths need double backslashes in that file. If output doesn't reproduce the way you expect, make sure you're actually reusing the same seed input rather than letting it change between runs.

And the pack-wide caveat: WAS Node Suite has been unmaintained since December 2023, with "Import Failed" errors after a ComfyUI update a real, recurring complaint tied to older pinned dependencies. Reinstalling requirements.txt inside your ComfyUI venv is the usual fix if the whole suite won't load.

CategoryWAS Suite/Conditioning

Inputs (5)

NameTypeDefaultDescription
modeCOMBOWhich substitution to run first. `Noodle Soup Prompts` swaps each __term__ for a phrase from the pack's built-in pantry of terminology; `Wildcards` swaps it for a random line from the matching file in the pack's wildcards directory, so __colors__ reads a line from colors.txt.
noodle_keySTRING__The marker that wraps a term to be substituted. With the default '__', the prompt writes __subject__; changing it to '$$' would make that $$subject$$ instead.
seedINT00–18446744073709550000Seed for the random choices, so the same seed always picks the same phrases and lines. 0 is the exception: it leaves the __term__ draw unseeded, so those come out different on every run while the <a|b|c> groups stay fixed.
textSTRINGThe prompt, written with any of three markups: __term__ for a pantry phrase or a wildcard line, <a|b|c> to pick one of the alternatives at random, and $|a stormy sky|$ to capture a phrase as $1, $2 and so on so it can be repeated by number.
clipCLIPThe text encoder that turns the finished prompt into conditioning, normally the CLIP output of a checkpoint loader.

Outputs (3)

NameTypeDescription
conditioningCONDITIONINGThe encoded prompt, for a sampler's positive or negative input.
parsed_textSTRINGThe prompt after substitution, the words that were actually encoded. Worth saving alongside the image, since a new seed produces different words.
raw_textSTRINGThe prompt exactly as typed, markup and all, before any substitution.