CLIP Text Encode Batch ๐
Encode a whole batch of prompts in one node
- clip
- texts
- CONDITIONING
This is the node that makes the rest of cgem156's batch_condition family actually worth using. The standard CLIPTextEncode takes one string and produces one conditioning. This one takes a whole BATCH_STRING - a batch of prompt variants built by BatchString, RandomColorPrompt, or PrefixString - and encodes all of them into a single batched CONDITIONING output in one node, instead of you wiring up a separate CLIPTextEncode for every variant.
Why this matters
Without this node, the rest of the batch-prompt pipeline is a lot less useful - generating ten prompt variants only helps if you can turn them into ten conditionings without ten manual nodes. This is the piece that connects prompt-batch generation to actual sampling: StringInput/BatchString/RandomColorPrompt/PrefixString build the text batch, this node encodes it, and a batched KSampler run turns it into a batch of images that SaveImageBatch/SaveBatchString write out at the end.
Inputs and outputs that matter
clip- your loaded CLIP model, same as the standard text encoder.texts- aBATCH_STRING, not a plain string. This is the one thing that's different from the node you're used to, and it's also the thing that trips people up first (see below).- Output:
CONDITIONING- a batch, ready to plug into a sampler'spositiveornegativeinput the same way a normalCLIPTextEncodeoutput would, just carrying more than one prompt's worth of conditioning.
Installing it
ComfyUI Manager โ search cgem156-ComfyUI๐ โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI
then restart ComfyUI. Nothing extra to download for this node.
Common issues & troubleshooting
Won't accept a normal string input. texts is typed as BATCH_STRING, not STRING - you can't wire a plain text box or the standard CLIPTextEncode's string widget into it directly. You need one of the pack's batch-producing nodes (BatchString, RandomColorPrompt, PrefixString, or even a single-entry BatchString) upstream first.
Conditioning batch size doesn't match your latent batch size. If your latent_image batch and this node's CONDITIONING batch are different sizes going into the sampler, you'll likely hit a shape mismatch or unexpected broadcasting. Keep the number of prompts here and the number of latents in your batch aligned.
Negative prompt handling. This node encodes whatever batch you give it - nothing stops you from using it for your negative conditioning too, but usually you want one shared negative prompt across the whole batch rather than a batch of different negatives. A single CLIPTextEncode (not the batch version) for your negative is usually simpler unless you specifically want per-item negatives.
Slower than expected on a big batch. Encoding is cheap compared to sampling, so if a run feels slow, it's almost certainly the sampling step multiplying across your batch size, not this node - check your batch size and step count before assuming the encoder is the bottleneck.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | โ | |
| texts | BATCH_STRING | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | โ |