Bernini Conditioning (Kijai Branch)
The Bernini conditioning node that does nothing on mainline ComfyUI (on purpose)
- positive
- negative
- vae
- source_video
- reference_video
- reference_images
- positive
- negative
- latent
Most nodes in this pack are safe to add to any graph. This one carries a big asterisk: Bernini Conditioning only changes model behavior if your ComfyUI build understands a conditioning key called context_latents - namely Kijai's ComfyUI/tree/bernini branch, or a future upstream equivalent. On ordinary mainline ComfyUI it sits in your graph as a well-behaved passthrough and the core Wan model simply ignores the extra conditioning it adds. That's not a bug; it's compatibility scaffolding for a specific way of running Bernini.
What it does when it works
It's the native-conditioning bridge for people running Bernini the "Kijai branch" way, where source and reference media travel through the graph as tensors rather than as file paths in a case JSON. The node:
- Encodes your media through the VAE.
- Appends those latents to both positive and negative conditioning under the
context_latentskey. - Returns a zero latent shaped for Wan/Bernini at your requested
width/height/length/batch_size- the sampler fills it with noise and denoises from there, so the zeros are expected, not a bug.
Inputs
- positive / negative (CONDITIONING) - your text conditioning, which comes back with context latents attached.
- vae - the Wan VAE used to encode media.
- width / height / length / batch_size - latent geometry.
lengthdefaults to 81 (Wan's native window), stepping by 4. - source_video (IMAGE) - base/edit frames for v2v/rv2v; resized to width×height and trimmed to
length. - reference_video (IMAGE) - moving reference content; keeps native aspect, long edge capped by
ref_max_size. - reference_images (IMAGE) - each image encoded as its own native-aspect context stream (the multi-reference mode).
- ref_max_size - long-edge cap for reference media, default 848.
Outputs
positive, negative (CONDITIONING) - with context_latents set when media was supplied. latent (LATENT) - the zero tensor for the sampler.
The practical question: which path are you on?
This pack's default recommended graph (Setup Commands → Model Config + Case Builder + Generation Settings → Run Single GPU) doesn't use this node at all - it passes media as file paths in the case JSON and lets the upstream script do the encoding. LzitsBerniniConditioning is the alternative branch for a ComfyUI-native graph, and only worth wiring if you're deliberately on Kijai's bernini branch. If you're on stock ComfyUI and wondering why your source video is having no effect, that's the answer.
Installing this node
One of the 16 nodes in the lzits Nodes pack (Lior Zitser, MIT). Install via ComfyUI Manager (search "lzits Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/lzitser23/lzits-nodes.git
Restart ComfyUI. No extra dependencies beyond ComfyUI's own (torch, VAE encode path).
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–8192 | — |
| height | INT | 48016–8192 | — |
| length | INT | 811–8192 | — |
| batch_size | INT | 11–4096 | — |
| source_videoopt | IMAGE | Base/edit video frames for v2v/rv2v. Resized to width x height and trimmed to length. | |
| reference_videoopt | IMAGE | Moving/content reference frames. Native aspect, long edge capped by ref_max_size. | |
| reference_imagesopt | IMAGE | Reference image batch. Each image is encoded as its own native-aspect context stream. | |
| ref_max_sizeopt | INT | 84816–8192 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |