Nodes/was-node-suite-comfyui/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 about a year ago· 1,812
CLIPTextEncode (NSP)

      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.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs