Batch Negative Prompts
One node, a whole list of rejections at once
- clip
- NEGATIVE_CONDITIONING
- NEGATIVE_PROMPT_LIST
The star of the Endless pack is the batch prompt encoder - a node that turns a list of prompts into a single batched conditioning tensor so your GPU renders them all in one go instead of one at a time. BatchNegativePrompts is the other half of that trick: the same simultaneous batching, but for the things you don't want in the image.
Here's the gap it fills. With stock ComfyUI you can set a latent batch size of 8 and get eight images at once, but they all share one prompt. To vary the prompt you had to queue multiple runs - same prompt each pass, or one long queue that processed prompts sequentially, burning wall-clock time. Endless solves that for the positive side with its SimpleBatchPrompts / FluxBatchPrompts nodes. This node does the matching job for negatives: type one negative per line, and each image in the batch gets its own matched negative instead of a single shared one.
How it works
The mechanism is straightforward and you can see it in the source: the node splits your negative_prompts on newlines, strips blanks, and encodes each line with the CLIP model (clip.tokenize + encode_from_tokens with pooled output), then stacks all the tensors along the batch dimension with torch.cat. The result is one CONDITIONING object whose batch size equals your prompt count. Plug it into the same KSampler as your batched positive conditioning, and prompt #3's negative lands on image #3.
The max_batch_size input (0 to 64, default 0) is the one knob worth understanding:
- 0 - use exactly as many lines as you typed.
- lower than your line count - truncates to the first N lines.
- higher - cycles through your lines to pad the batch out to N.
So with two negative lines and max_batch_size = 6, you get line1, line2, line1, line2, line1, line2 for a six-image batch. That's a genuinely useful way to A/B two negatives across a batch.
Inputs and outputs
Only four inputs, all visible on the node:
negative_prompts- multiline, one negative per line. Empty input is handled: the node falls back to a single empty negative rather than crashing.clip- your CLIP encoder, same one feeding the positive side.print_output- logs each prompt to the console. Helpful when you're debugging why image 5 looks cursed, but noisy after the first few runs.max_batch_size- see above.
Outputs: NEGATIVE_CONDITIONING (wire into the negative input of your KSampler) and NEGATIVE_PROMPT_LIST, a pipe-separated string (|) meant for the Endless Image Saver's filename support, so each saved image can carry its own negative in the name.
Installing it
Install the whole pack once - this node is part of Endless πβ¨ Nodes by tusharbhutt. Easiest route: ComfyUI Manager β "Install Custom Nodes" β search "Endless" β install β restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/tusharbhutt/Endless-Nodes
# restart ComfyUI
No model downloads and no extra pip packages for this node; the pack's declared dependencies are empty, and torch/PIL are already part of ComfyUI. When it's installed you'll see an "Endless πβ¨" menu, and a Ctrl-Alt-E toolbar button you can ignore until you want it.
Common issues
- "No valid prompts found" - the node needs at least one non-blank line in
negative_prompts; feed it a blank list and it quietly falls back to an empty negative instead (that's the one forgiving path). - Wrong batch size - if your positive batch has 6 prompts but this node outputs a 2-tensor conditioning, the sampler complains about a batch mismatch. Keep
max_batch_sizematching your positive side, or just leave it at 0 and keep line counts aligned. - It's a niche pack - a one-maintainer hobby project (the README cheerfully admits the author is "not a programmer" and leans on ChatGPT/Claude for the code). It works, but don't expect weekly maintenance. Keep an eye on the GitHub repo before installing a big workflow that depends on it.
One honest caveat from the author's own README: this pack has gone through a full rewrite (June 2025) and the batch nodes are its most-tested feature. This one in particular is simple enough that it's hard for it to bite you - which is exactly what you want from a negative prompt node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| negative_prompts | STRING | blurry, low quality artifacts, distorted noise, bad anatomy | β |
| clip | CLIP | β | |
| print_output | BOOLEAN | true | β |
| max_batch_size | INT | 00β64 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| NEGATIVE_CONDITIONING | CONDITIONING | β |
| NEGATIVE_PROMPT_LIST | STRING | β |