Kandinsky2.2 Prior 3-Averaging
Prior 3-Averaging
- in1
- in2
- in3
- PRIOR_LATENT
Prior 3-Averaging is exactly what it says on the tin: the same weighted-sum blend as the pack's 2-input version, but with three PRIOR_LATENT inputs instead of two. If you understand why you'd mix an image embedding with a text embedding, you already understand this node - it just lets you throw a third embedding into the pot.
Kandinsky 2.2's neat trick is that image embeddings and text embeddings are the same shape and live in the same space, so you can mix them arithmetically before the decoder ever runs. This node takes in1, in2, and in3, multiplies each by its weight, and sums them into a single PRIOR_LATENT. The classic use: one input from a reference image's encoding, one from a text prompt, and a third from a second prompt - say, a style word - to steer the blend. Weights don't need to sum to 1; the node is a plain weighted sum. The defaults are 0.33 / 0.33 / 0.34, which is a decent starting point.
Inputs and output
in1/w1(0.33),in2/w2(0.33),in3/w3(0.34) - three prior latents and their weights.
Output: one PRIOR_LATENT, into the Unet Decoder's image_embeds port.
Honest take: nobody uses this. The shipped workflows all use the 2-input version, and the 4-input sibling exists too. This node is here for the rare case where you actually want three-way blending - mostly people discover they can chain two 2-input averages instead and get finer control. If you found this via a workflow that uses it, wire it as intended; if you're building from scratch, start with Prior 2-Averaging.
Installing it
Manual install, same as every node in this pack (the README says it's not in ComfyUI Manager's list):
cd ComfyUI/custom_nodes
git clone https://github.com/vsevolod-oparin/comfyui-kandinsky22
cd comfyui-kandinsky22
python -s -m pip install -r requirements.txt
Models:
git clone --depth 1 https://huggingface.co/kandinsky-community/kandinsky-2-2-prior
git clone --depth 1 https://huggingface.co/kandinsky-community/kandinsky-2-2-decoder
git clone --depth 1 https://huggingface.co/kandinsky-community/kandinsky-2-2-controlnet-depth
Gotchas
- Everything in, everything
PRIOR_LATENT. Each input must be an embedding from the pack's encoders - text encoders, the Image Encoder, or another averaging node. Bare LATENTs or SD-style conditionings won't plug in. - Dependency pin. Old
diffuserscommit +accelerate==0.27.2inrequirements.txtcan break other custom nodes sharing the environment. - Vintage model. Kandinsky 2.2 has been effectively dead in the community since mid-2024. This is a fun, historically interesting node in a fun, historically interesting pack - not something you'd reach for in a production workflow today.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| in1 | PRIOR_LATENT | — | |
| w1 | FLOAT | 0.330–100 | — |
| in2 | PRIOR_LATENT | — | |
| w2 | FLOAT | 0.330–100 | — |
| in3 | PRIOR_LATENT | — | |
| w3 | FLOAT | 0.340–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| PRIOR_LATENT | PRIOR_LATENT | — |