Kandinsky2.2 Text Encoder
The Full Kandinsky 2.2 Prior Encoder — With a Real Negative Prompt
- text_encoder
- image_embeds
- negative_image_embeds
Most people never use this node - the pack's own example workflows reach for the slimmed comfy-kandinsky22-positive-text-encoder instead. But this is the complete version of Kandinsky 2.2's prior: it takes both a prompt and a negative_prior, and gives you back clean image_embeds and negative_image_embeds outputs.
As with its positive-only sibling, "text encoder" is a fib. This node runs the prior - a small diffusion model that denoises in image-embedding space - for num_inference_steps before it hands anything to the decoder. That's the DALL·E-2-style two-stage design that made Kandinsky 2.2 interesting in 2023: the text gets "imagined" into an embedding first, and only then does the UNet decode pixels.
The inputs
text_encoder- from the Prior Loader'sTEXT_ENCODERoutput.prompt- multiline, your positive.negative_prior- multiline, your negative. Unlike the positive-only node, this one actually feeds the classifier-free guidance inside the prior, so negative text steers the embedding, not just the pixels.num_inference_steps(default 20) - diffusion steps in the prior.guidance_scale(default 8) - CFG for the prior pass. 0 disables CFG entirely.seed- the prior's noise seed.
Outputs: image_embeds and negative_image_embeds, both PRIOR_LATENT. Wire image_embeds into the Unet Decoder's image_embeds port and negative_image_embeds into its negative_image_embeds port, and you've got a proper two-port conditioning setup - the only reason you need the two-positive-encoder hack from the simple workflow is that this node didn't get used there.
Installing it
Same pack install as everything else here - manual clone, since the README says the repo isn't 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 go into ComfyUI/models/checkpoints:
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
- Wrong folder, wrong loader. The
ckptdropdowns on both loaders list every folder inmodels/checkpointswhose name contains "kandinsky" - all three of them. The Prior Loader must point atkandinsky-2-2-prior. Choose the decoder folder and loading blows up. - Slow, then slow. A prior diffusion pass plus a decoder pass plus fp16 model shuffling between GPU and CPU. Budget for it.
- Dependency pin.
requirements.txtlocksdiffusersto an old commit andaccelerate==0.27.2, so installing this pack can break other nodes that want newer versions. It's the first thing to suspect when unrelated things start failing after install. - It's a relic, honestly. Kandinsky 2.2 is a 2023 model that the community stopped talking about around mid-2024. It has a distinctive painterly style and genuinely good prompt adherence for its era - fun to run, not your daily driver.
If you don't need a negative inside the prior, the positive-only node is lighter and matches the author's example graphs. Reach for this one when you want real negative conditioning in the embedding pass.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| text_encoder | TEXT_ENCODER | — | |
| num_inference_steps | INT | 201–10000 | — |
| guidance_scale | FLOAT | 8.00–100 | — |
| seed | INT | 00–18446744073709550000 | — |
| prompt | STRING | — | |
| negative_prior | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image_embeds | PRIOR_LATENT | — |
| negative_image_embeds | PRIOR_LATENT | — |