Kandinsky2.2 Image Latents
Kandinsky 2.2 Image Latents — the img2img Starting Point
- movq
- image
- lat_info
- LATENT
The Latents node gives you blank noise; this one gives you noise plus your image. comfy-kandinsky22-img-latents is the img2img starting point for Kandinsky 2.2: it takes a real image, encodes it into latent space with the MovQ VAE, and packages it together with fresh noise so the Unet Decoder can transform it instead of starting from scratch.
How it works
This is the node that makes image-to-image possible, and the design is elegant: it encodes your source image with the MOVQ VAE to get init_latents, generates noise from your seed, and bundles both into a single LATENT object. Downstream, the Unet Decoder's strength slider decides how much of that init_latents survives - strength 1 means it starts at the full noise end and mostly ignores your image, lower values start the denoise loop partway through, keeping more of the source visible. That's the same strength/denoise relationship you already know from SD img2img, just implemented inside Kandinsky's decoder.
It's worth noting this node handles the pixels of your source image, while comfy-kandinsky22-image-encoder handles the meaning of it (the CLIP image embedding). A proper Kandinsky img2img graph feeds both: image embeds as conditioning, image latents as the starting point.
Inputs
movq- theMOVQoutput from the Decoder Loader.image- your source IMAGE, resized internally to match theheight/widthyou set.lat_info-LATENT_INFOfrom the Decoder Loader.batch_size(default 1, max 16),height,width(default 512, stepped by 64),seed.
Output: LATENT, into the Unet Decoder's latents port.
Installing it
Manual clone, per the 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
- Three required wires.
movq,lat_info, andimageall have to be present and from the right loaders, or the node errors out on the encode. The most common mistake is wiringlat_infofrom the Prior Loader - it only exists on the Decoder Loader. - The
strengthsetting lives on the decoder, not here. People look for the img2img intensity slider on this node and can't find it. It's oncomfy-kandinsky22-unet-decoder. - Dependency pin. Old
diffuserscommit +accelerate==0.27.2inrequirements.txtcan collide with other nodes in the shared environment. - 2023 speed. VAE encode plus a partial denoise is not quick, and the fp16 models shuffle between GPU and CPU between stages. The community stopped actively using Kandinsky 2.2 around mid-2024; the img2img here is still a nice, distinct look if you're in the mood.
Wired correctly, this node plus the Unet Decoder's strength gives you the whole img2img loop - the pack's workflow-img2img.json is the reference.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| movq | MOVQ | — | |
| image | IMAGE | — | |
| lat_info | LATENT_INFO | — | |
| batch_size | INT | 11–16 | — |
| height | INT | 51264–8192 | — |
| width | INT | 51264–8192 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |