Nodes/XB_ToolBox/XB-BOX - 📝 CLIP 文本编辑
ComfyUI Node

XB-BOX - 📝 CLIP 文本编辑

Type the prompt once, get a positive and a kill-switch negative

By wjluoxiao·Created 7 months ago·Updated a day ago· 406
XB-BOX - 📝 CLIP 文本编辑
  • clip
  • 正向条件
  • 零化后负面条件
◄text—►

The annoyance it removes

Every ComfyUI graph has the same little ritual: one CLIP Text Encode for the thing you want, and a second one for the thing you don't - which, more and more often these days, is nothing. Load a stock Flux, Qwen-Image or Wan workflow and the negative slot is usually fed by Conditioning Zero Out, a node whose entire job is to hand the sampler an empty tensor.

XB_CLIPTextEdit collapses that pair. One text box, one CLIP input, two conditioning outputs: your real prompt, and a zeroed-out version of it you can park in any negative socket. That's it. It's not clever, it's just a node you stop having to think about - and if you're building workflows for other people, using it means they can't accidentally leave a negative prompt dangling.

How it works, honestly

It's a wrapper, and I mean that as a compliment. The source does a deep copy of the official CLIPTextEncode input definition, so the node inherits whatever the official text encoder currently accepts - no hand-maintained fork to fall behind. Then it calls the official encoder's encode directly (it inspects the method signature and forwards only the arguments the current ComfyUI build actually takes, which is how it survives official nodes gaining or losing parameters). No reimplementation, no altered math.

The negative comes from literally feeding that result into the official ConditioningZeroOut, or - if your build doesn't expose it - into a local equivalent that does the same two things: zero the conditioning tensor and zero pooled_output. Same output either way.

One consequence worth knowing: both outputs come from one text encode, so you're not paying twice for the same tokens, and the two conditionings are guaranteed to match, because one is derived from the other.

What you set, and where it goes

There are exactly two inputs, which is the whole appeal. clip takes your text encoder - and take this seriously, it has to be the encoder that matches your model. Feeding a CLIP-L into a workflow that's running an LLM-style text encoder gets you conditioning shaped like the wrong universe. text is the prompt box. It also carries the official node's dynamic-prompt flag, so {red|blue} style wildcard syntax works there if you have the extension that expands it installed.

The two outputs are both CONDITIONING, named in Chinese: 正向条件 (positive) and 零化后负面条件 (zeroed negative). Wire the first into the sampler's positive slot and the second into its negative slot. In a video workflow where the negative input is mandatory but you have no intention of using it - Wan and the InfiniteTalk/VACE family all want one - this is the tidiest thing you can plug in.

Where people get burned

The zeroed negative is genuinely empty, not "mildly neutral". That's exactly right on guidance-distilled models, where the negative pass is inert anyway: at CFG 1 there is no unconditional pass for a negative to steer, which is why people testing negatives on Turbo-class models report that a whole paragraph of blurry, deformed, bad anatomy does absolutely nothing. If you're on one of those, this node matches reality.

Flip side: if you're still running SD 1.5, SDXL or an Illustrious fine-tune at real CFG, negatives still work, and this node takes that tool away. There's no field to put them in - use the plain official encoder instead.

Also: the negative isn't a second prompt you didn't get to see. It's a zero tensor shaped from your positive, so swapping this node into a graph that had a real negative branch will change your output, quietly.

Installing it

This is one node inside XB_ToolBox, a 141-node beginner-oriented toolbox by WJLUOXIAO. The pack has essentially zero footprint in the English-language Reddit corpus - you won't find threads troubleshooting it, so the README (half of which is Chinese) and the source are your documentation.

ComfyUI Manager: search XB_ToolBox and install. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/XB_ToolBox.git

then restart ComfyUI. The node lands under XB_ToolBox/Text in the add-node menu, with a display name of XB-BOX - 📝 CLIP 文本编辑.

One warning that applies to the whole pack: do not blanket-install its requirements.txt just to get a text-encoding node. That file is the shopping list for all 141 nodes - EasyOCR, onnxruntime, pythonnet, ModelScope, openai-whisper, matplotlib - and none of it is needed here. This node needs nothing beyond a working ComfyUI.

If the entire pack fails to appear in the menu, check the console for 🚨 [XB-BOX] FATAL ERROR: XB_ToolBox Loading Failed!. The pack's __init__.py registers everything inside one big try, so a single failed import anywhere takes the whole thing down. Read the traceback above that banner - the missing package it names is your actual problem, not this node.

CategoryXB_ToolBox/Text

Inputs (2)

NameTypeDefaultDescription
textSTRINGThe text to be encoded.
clipCLIPThe CLIP model used for encoding the text.

Outputs (2)

NameTypeDescription
正向条件CONDITIONING—
零化后负面条件CONDITIONING—