Nodes/ComfyUI-ZeroCLIP-nodes/ZeroClip-B Conditioning
ComfyUI Node

ZeroClip-B Conditioning

ZeroClip-B Conditioning

By MushroomFleet·Created 5 months ago·Updated 5 months ago· 0
ZeroClip-B Conditioning
  • model
  • seed
  • conditioning

ZeroClip-B Conditioning is the B variant's answer to "give me a CONDITIONING from a seed" - except instead of looking up anchors, it runs a tiny trained network to compute the conditioning. The pitch: microsecond inference, no per-image lookup work, and because the network is a smooth function of its input coordinates, the seed space is a continuous manifold you can walk like a landscape.

Here's the difference from A in one line: A is a weighted sum over a fixed library of real CLIP embeddings (a lookup blended by coherent noise); B is a neural network trained to map seed-derived 3D coordinates directly into CLIP embedding space. That training is why B is the "continuous manifold navigation" variant - the network has learned a smooth map, so small seed nudges produce small, coherent embedding changes, and you can wander between concepts without hitting the library's sparsity.

The inputs

  • model - the ZEROCLIP_B_MODEL from a ZeroClip-B Load MLP node. This is your trained map from coordinates to embeddings.
  • seed - a ZEROCLIP_SEED from Seed Pack or Seed From Random; its four values (concept, style, mood, world) get packed and turned into the 3D coordinate the network eats.

Output is a standard CONDITIONING for KSampler's positive input - pair it with ZeroClip Empty Conditioning on the negative side at CFG > 1.

How it works

The seed is hashed (FNV-1a) and reduced to a coordinate, the MLP forward-pass maps it through Linear(3→256) → GELU → 256 → GELU → 256 → GELU → 256 → D, the output is L2-normalized (the network's final layer does this), and it's expanded to [1, 77, D]. All of it runs on CPU in microseconds - for a workflow that's otherwise spending seconds per image in the sampler, the conditioning cost is literally noise.

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/B - Latent MLP. No pip install at runtime; you need the zerocliP_b.pt checkpoint in models/zeroclip/ (download from huggingface.co/mushroomfleet/zeroclip or train via --variant B).

The honest take

B is the variant I'd pick when you want the smoothest possible interpolation behavior from the pack and the smallest runtime footprint. But it's also the one that depends most on the quality of its training run - a poorly trained MLP maps seeds to mush. If you're using the prebuilt checkpoint it's fine; if you train your own, expect to iterate on the build before the walks look good. And remember B's output space is learned, so unlike A it has no direct line back to "these are real words" - you can't inspect which concept an embedding resembles.

CategoryZeroClip/B - Latent MLP

Inputs (2)

NameTypeDefaultDescription
modelZEROCLIP_B_MODEL
seedZEROCLIP_SEED

Outputs (1)

NameTypeDescription
conditioningCONDITIONING