Nodes/ComfyUI-ZeroCLIP-nodes/ZeroClip-D Batch Conditioning
ComfyUI Node

ZeroClip-D Batch Conditioning

ZeroClip-D Batch Conditioning

By MushroomFleet·Created 5 months ago·Updated 5 months ago· 0
ZeroClip-D Batch Conditioning
  • anchors
  • conditioning
concept_start0
concept_end65535
batch_size8
style_id500
mood_salt0
world_seed42

The batch sweep is such a natural fit for seed-driven conditioning that the pack implements it twice: once for the text-derived anchors (A) and once for the self-bootstrapped anchors (D). ZeroClip-D Batch Conditioning is the D version - take the bootstrap anchor library, walk concept_id across a range, and emit a whole batch of CONDITIONING vectors in one go, shape [B, 77, D].

If you've read the A batch node, this is the same node with a different anchor type, and everything that made the A sweep useful applies here: a fixed style/mood/world with concept_id walking a range gives you a row of related images you can drop into batch-aware sampling for a grid. The one thing that changes is the flavor of the anchors - these come from the diffusion model's own discovered prior, not from text, so the "concepts" you're sweeping are latent regions the model knows, not words.

The inputs

  • anchors - the ZEROCLIP_D_ANCHORS from a ZeroClip-D Load Anchors node.
  • concept_start (0) and concept_end (65535) - the sweep range for concept_id.
  • batch_size (8, max 256) - points in the sweep, evenly spaced via np.linspace.
  • style_id (500), mood_salt (0), world_seed (42) - held constant across the batch so the sweep is a clean one-axis walk.

Output: conditioning at batch shape, downstream into batch-capable sampling.

How it works

Identical mechanics to the A batch node: np.linspace from start to end over batch_size concept_ids, each one run through the same D conditioner (coherent-noise weighted sum over the bootstrap anchors, L2-normalized), stacked, and expanded to [B, 77, D]. Because the weight function is smooth in concept_id, the batch is a smooth walk through the model's latent structure rather than B unrelated dice rolls.

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/D - Self-Bootstrapped. No pip install; needs the prebuilt anchors_bootstrap.npy in models/zeroclip/ (download from huggingface.co/mushroomfleet/zeroclip - the build takes ~5 hours on GPU).

The trap

The defaults of start=0, end=65535 sweep the entire concept space - with D that's a tour of the model's whole discovered prior, which is a fun one-time experiment and a poor everyday default. Narrow the window to actually see relationships between neighbors. And be honest about the VRAM math: batch_size 256 through a sampler is a lot of latent to hold at once. Also keep in mind that D's latent regions aren't nameable, so a D sweep reads less predictably than an A sweep - expect surprises, which is either the appeal or the reason you'll reach for A.

CategoryZeroClip/D - Self-Bootstrapped

Inputs (7)

NameTypeDefaultDescription
anchorsZEROCLIP_D_ANCHORS
concept_startINT00–65535
concept_endINT655350–65535
batch_sizeINT81–256
style_idINT5000–65535
mood_saltINT00–65535
world_seedINT420–18446744073709550000

Outputs (1)

NameTypeDescription
conditioningCONDITIONING