Nodes/quadmoon's ComfyUI nodes/CLIPTextEncode - Smart Negative
ComfyUI Node

CLIPTextEncode - Smart Negative

The negative prompt you type into every single workflow, saved once per model

By traugdor·Created 3 years ago·Updated 9 months ago· 16
CLIPTextEncode - Smart Negative
  • trigger
  • clip
  • NEGATIVE -
config_name
optional_texttext, watermark,

If you run SDXL or anything on that lineage, you have a negative prompt you paste everywhere: text, watermark, lowres, bad anatomy, extra fingers - that whole block. quadmoonSmartNeg is the "CLIPTextEncode - Smart Negative" node, and its entire job is to stop you retyping that. You save the block once, keyed to the model you use it with, and this node looks it up and encodes it for you. It's the negative half of quadmoon's "Smart Nodes" trio, and it's genuinely nice for anyone who juggles a handful of checkpoints with different pet negatives.

How it works

The clever part is that saved negatives are scoped to a model, not just to a name. The pack's Load Model - Smart node (class qmModelLoader) outputs a special SMART_TRIGGER wire alongside the usual MODEL/CLIP/VAE. That trigger is a hash of the checkpoint's filename plus the filename itself - so the node always knows which checkpoint you're on. Your saved negatives live in a JSON file called qmSmartNodesConfig.json, and this node looks up the negative for your trigger and your config name, then encodes it with the same clip.tokenize() / clip.encode_from_tokens() path the core CLIPTextEncode uses. Nothing fancy on the encode side; the "smart" is all in where the text comes from.

The inputs that matter

  • trigger (SMART_TRIGGER, required) - wire this from Load Model - Smart. It's how the node knows which model's negative to pull.
  • config_name (STRING, required) - and here's the trap: it's marked forceInput, so you can't type a name into the widget. You have to wire it, usually from the pack's Load Config - Smart node, which lists the configs you've saved.
  • clip (CLIP, required) - your model's CLIP.
  • optional_text (STRING, optional, default text, watermark, ) - the fallback used if no saved negative matches.

The output is a single NEGATIVE - (CONDITIONING), which plugs straight into the negative input on any KSampler or into a Conditioning (Combine) node.

Setting it up

  1. Load your checkpoint with Load Model - Smart and grab the trigger output.
  2. Run a workflow once with Save Smart Negative Config: feed it the text, the trigger, and a config name. It writes qmSmartNodesConfig.json.
  3. Add this node, wire trigger + clip, and feed config_name from Load Config - Smart.
  4. Done - every workflow for that model now pulls the saved negative.

Common issues

  • "The config_name field won't let me type." That's the forceInput quirk - wire it from Load Config - Smart or any STRING output.
  • "My saved negative vanished." Configs are keyed to the checkpoint's filename hash. Rename or move the model file and the stored entry orphans until you re-save. The pack's own code comments call this out.
  • "Where is my config file?" qmSmartNodesConfig.json is created in the directory you launched ComfyUI from, not inside the pack. Back it up if you move machines.
  • "The node encodes but does nothing." Check your CFG. A negative prompt only steers while real classifier-free guidance runs, i.e. CFG above 1. On guidance-distilled models - Flux, turbo/Lightning checkpoints - the negative box is inert by design, and no node can fix that.

One honest take: the default fallback text, watermark, is exactly the boilerplate that mostly fails A/B tests on a fixed seed. Name the specific defect you can see instead, and the node just makes that habit easy to keep consistent.

Installing the pack

Install via ComfyUI Manager (search "quadmoon's ComfyUI nodes", or use Install via GIT URL with https://github.com/traugdor/ComfyUI-quadMoons-nodes.git), then restart ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/traugdor/ComfyUI-quadMoons-nodes.git
# then restart ComfyUI

The pack has no requirements.txt and needs no model downloads - the smart nodes only use ComfyUI's own comfy.sd and folder_paths. One caveat if you clone by hand: the repo vendors jags111's efficiency-nodes as a git submodule for other nodes in the pack, so if something else in the pack errors, re-clone with git clone --recurse-submodules.

CategoryQuadmoonNodes/SmartNodes

Inputs (4)

NameTypeDefaultDescription
triggerSMART_TRIGGER
config_nameSTRING
clipCLIP
optional_textoptSTRINGtext, watermark,

Outputs (1)

NameTypeDescription
NEGATIVE -CONDITIONING