ZeroClip-A Batch Conditioning
ZeroClip-A Batch Conditioning
- anchors
- conditioning
One of the best things about seed-driven conditioning is that you can sweep it - generate a whole strip of related images by walking concept_id. ZeroClip-A Batch Conditioning does that sweep in a single node: it takes an anchor library, walks concept_id from a start to an end value, and emits a batch of conditioning vectors at once.
The output is a CONDITIONING tensor of shape [B, 77, D] - B conditionings, each a different concept along the sweep, all sharing the same style/mood/world. That's the intended workflow for grid generation: build the batch, feed it to batch-aware sampling, and get a row of images that morph smoothly across the concept axis instead of being unrelated rolls of the dice.
The inputs that matter
- anchors - the
ZEROCLIP_A_ANCHORSfrom a Load Anchors node. - concept_start (0) and concept_end (65535) - the range of concept_id to sweep. This is where you make the call that defines the whole batch.
- batch_size (8, max 256) - how many points in the sweep. The node uses
np.linspace, so with start=1000, end=1100, batch_size=11 you get concept_ids 1000, 1010, 1020, … 1100 - evenly spaced. - style_id (500), mood_salt (0), world_seed (42) - fixed across the whole batch, so the sweep is a clean one-axis walk.
Output: conditioning at batch shape. It's not an output node - the batch still flows downstream.
How it works
Straightforward and honest: it linearly spaces batch_size concept_ids between start and end, computes each one's conditioning with the exact same algorithm as the single ZeroClip-A Conditioning node (coherent-noise weights over the anchor library, L2-normalized), stacks them, and expands to [B, 77, D]. Because A's weighting is a smooth function of concept_id, the batch is a smooth walk - which is the entire point of sweeping rather than randomizing.
Install
Part of ComfyUI-ZeroCLIP-nodes. ComfyUI Manager (search "ZeroCLIP"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/ComfyUI-ZeroCLIP-nodes
Restart ComfyUI; it's under ZeroClip/A - Basis Decomposition. No pip install; needs the A anchor artifact in models/zeroclip/.
The trap: the default sweep is the whole universe
The defaults are concept_start=0 and concept_end=65535 - a full sweep across the entire 16-bit concept space. With batch_size 8 that's eight wildly different concepts, which is usually not what you want. Set a narrow window (say 1000→1100) so each step is a small nudge and the grid actually shows a relationship between neighbors. Also remember: the bigger the batch, the more VRAM the sampler needs - batch_size 256 with a big checkpoint is a great way to meet your OOM error for the first time.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| anchors | ZEROCLIP_A_ANCHORS | — | |
| concept_start | INT | 00–65535 | — |
| concept_end | INT | 655350–65535 | — |
| batch_size | INT | 81–256 | — |
| style_id | INT | 5000–65535 | — |
| mood_salt | INT | 00–65535 | — |
| world_seed | INT | 420–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |