Kandinsky2.2 Prior Loader
The Prior Loader
- IMAGE_ENCODER
- TEXT_ENCODER
Every Kandinsky 2.2 graph starts here. The Prior Loader is the node that pulls in the whole prior pipeline - the half of Kandinsky 2.2 that reads your text and image and produces image embeddings. Without it, none of the conditioning nodes have anything to work with.
What it loads
Kandinsky 2.2 is split into two models, and this loader handles the first one, the kandinsky-2-2-prior repo from the kandinsky-community collection on HuggingFace. It's loaded through the diffusers KandinskyV22PriorPipeline in fp16, which bundles a CLIP text encoder, a CLIP image encoder, the embedding-space diffusion model, a scheduler, and a precomputed "zero embedding" for guidance. The node then hands you two handles:
IMAGE_ENCODER- image processor + CLIP image encoder, for the Image Encoder node.TEXT_ENCODER- tokenizer, text encoder, prior, scheduler, and zero embeds, for the text/prior encoder nodes.
Both outputs typically come out of the same loader, so the single ckpt dropdown is the only thing you set.
The one input that matters
ckpt- a dropdown of folders inComfyUI/models/checkpointswhose name contains "kandinsky". Pickkandinsky-2-2-prior. This is the classic trap: the dropdown is built by filtering on the word "kandinsky", so the decoder and controlnet-depth folders show up in this loader's list too. Point it at the wrong folder andfrom_pretrainedfails with a component-mismatch error rather than anything helpful.
Installing it
Manual clone, per the README - 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
And the models, cloned 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
git clone prints almost nothing while these multi-GB repos download, so give it time before you assume it's hung.
Gotchas worth knowing
- First load is slow and hungry. Loading a full diffusers pipeline in fp16 takes a while and a real chunk of VRAM. The node offloads the image encoder and the prior back to CPU when it's done, so later stages share the GPU, but the initial spike is what it is.
- The dependency pin.
requirements.txtpinsdiffusersto a specific old commit andaccelerate==0.27.2. If other custom nodes start misbehaving after install, that pin is the usual suspect - it's a shared environment with no isolation. - The model is old. Kandinsky 2.2 shipped mid-2023 and community use basically stopped by mid-2024. This pack is a tinkerer's toy: a distinct, painterly look and a peek at the other architectural branch of that era, not a serious rival to what you run today.
Wire the TEXT_ENCODER output into a comfy-kandinsky22-positive-text-encoder or comfy-kandinsky22-text-encoder, the IMAGE_ENCODER into a comfy-kandinsky22-image-encoder, and you've got the entire conditioning half of a Kandinsky 2.2 graph.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ckpt | COMBO | 0 options: |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE_ENCODER | IMAGE_ENCODER | — |
| TEXT_ENCODER | TEXT_ENCODER | — |