Nodes/Kandinsky 2.2 ComfyUI Plugin/Kandinsky2.2 Prior 4-Averaging
ComfyUI Node

Kandinsky2.2 Prior 4-Averaging

Kandinsky 2.2 Prior 4-Averaging — the Blender Nobody Needs

By vsevolod-oparin·Created 2 years ago·Updated about a year ago· 9
Kandinsky2.2 Prior 4-Averaging
  • in1
  • in2
  • in3
  • in4
  • PRIOR_LATENT
w10.25
w20.25
w30.25
w40.25

Prior 4-Averaging is the biggest member of the pack's averaging family, and it's also the least used - for good reason. It's a weighted sum over four PRIOR_LATENT inputs, the same operation as the 2- and 3-input siblings, just with more legs. If you've read either of those, you know the mechanism: Kandinsky 2.2's image and text embeddings are the same shape and live in the same space, so you can blend them arithmetically before the decoder runs, multiplying each by a weight and summing.

When you'd actually use four

The honest answer: almost never. The pack's own shipped workflows cap out at two inputs. Four-way blending is for when you genuinely want to stack, say, two reference-image encodings and two text prompts into one embedding - a use case so rare that most people who start here end up chaining 2-input averages instead, because that gives them intermediate control points. This node is completeness, not necessity.

Weights are a plain sum, not normalized - defaults are 0.25 / 0.25 / 0.25 / 0.25, and they can go above 1 or be uneven without complaint. If you do use it, keep the sum near 1 or your embedding can get pushed off into weird territory.

Inputs and output

  • in1in4, each with a w weight (all default 0.25), four PRIOR_LATENTs in, one blended PRIOR_LATENT out, straight into the Unet Decoder's image_embeds port.

Installing it

Manual install, same as the whole pack (README: 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

  • All four inputs must be embeddings. Text encoders, the Image Encoder, or other averaging outputs - anything PRIOR_LATENT. A LATENT or SD conditioning won't fit the port, and neither will raw images.
  • Dependency pin. Old diffusers commit and accelerate==0.27.2 in requirements.txt can clobber other nodes' dependencies in the shared environment.
  • Model's dead, but that's fine. Kandinsky 2.2 stopped getting community attention around mid-2024, so you're almost certainly here rebuilding a vintage workflow. This node is a small, forgotten part of a forgotten model - charming in exactly that way.

If the number of inputs is overkill, the 2-input version is the one the example graphs actually use.

Categoryconditioning

Inputs (8)

NameTypeDefaultDescription
in1PRIOR_LATENT
w1FLOAT0.250–100
in2PRIOR_LATENT
w2FLOAT0.250–100
in3PRIOR_LATENT
w3FLOAT0.250–100
in4PRIOR_LATENT
w4FLOAT0.250–100

Outputs (1)

NameTypeDescription
PRIOR_LATENTPRIOR_LATENT