ComfyUI Extension: Kandinsky 2.2 ComfyUI Plugin

Authored by vsevolod-oparin

Created

Updated

10 stars

Nodes provide an options to combine prior and decoder models of Kandinsky 2.2.

README

Kandinsky 2.2 ComfyUI Plugin

Use the models of Kandinsky 2.2 published on 🤗 HuggingFace in ComfyUI.

Features provided

Nodes provide options to combine prior and decoder models of Kandinsky 2.2.

  • Find priors for text and images.
  • Combine priors with weights.
  • Prepare latents only or latents based on image (see img2img workflow).
  • Use depth hint computed by a separate node.

All the weights can be found in Kandinsky Community on 🤗 HF in Kandinsky 2.2 Collection.

Workflow Examples

  • A simple text-based workflow (source).

  • A workflow based on image prior embeds (source)

  • An Image-To-Image workflow (source)

  • A depth based workflow (source)

Note: Don't forget to switch to kandinsky-2-2-controlnet-depth in decoder node.

Installation

For the easiest experience, install the Comfyui Manager and use it to automate the installation process. The repository is not included in the list at the moment, but you'll need Marigold depth estimation, that can be installed via manager.

To install the plugin, open the terminal, cd to <ComfyUI>/custom_nodes, and clone the repo:

git clone https://github.com/vsevolod-oparin/comfyui-kandinsky22

Install the requirements using:

python -s -m pip install -r requirements.txt

Download Models

Go to models/checkpoints in ComfyUI directory and run the command

git clone --depth 1 <HF repository>

E.g. to download needed checkpoints for the presented pipelines run the following

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

Note 1: Git won't show much of the progress. You'll need to wait till the models will be downloaded.

Note 2: Argument --depth can be skipped, but you're risking to download a lot of unnecessary data.

Acknowledgments

A special thanks to:

  • The developers of Kandinsky Model.
  • Patrick Von Platent for moving Kandinsky to diffusers.
  • Comfyanonamous and the rest of the ComfyUI contributors for a fantastic UI!