Kandinsky 5¶
| Model | Source | Revision | Weight license | Parity (CPU, fp32) |
|---|---|---|---|---|
kandinsky-5-t2i-lite |
kandinskylab/Kandinsky-5.0-T2I-Lite-sft-Diffusers | 25da1e8 |
MIT | Verified |
Catalog: kandinsky-5 ·
Models: kandinsky-5-t2i-lite · Task: t2i
Architecture. A flow-matching text-to-image diffusion transformer. A Qwen2.5-VL text model encodes a templated prompt into token embeddings; a secondary CLIP ViT-L text encoder supplies a pooled text embedding. A 3D transformer (patch size 1×2×2 over the latent depth, height and width) denoises 16-channel latents with self-attention, cross-attention to the Qwen states, and 3D rotary position embeddings for the visual tokens. An f=8 FLUX-style autoencoder (scaling factor 0.3611, shift 0.1159) maps between 16-channel latents and pixels. The scheduler is flow-match Euler with a shift of 5.0.
Usage.
from imagehub import pipeline
with pipeline(
"t2i", backend="kandinsky5", model="checkpoints/kandinsky-5-t2i-lite", device="mps"
) as pipe:
result = pipe("a cat, oil painting", seed=42)
result.images[0].save("cat.png")
Settings. The defaults are 50 steps, guidance 3.5 and 1024×1024. The supported options are
seed, latents, steps, guidance, width, height, num_images, negative_prompt and
max_sequence_length. Requests are snapped to one of the
published aspect ratios (1024×1024, 640×1408, 1408×640, 768×1280, 1280×768, 896×1152, 1152×896) by
matching aspect ratio, and the metadata holds the actual size. steps is at most 1000 and
max_sequence_length is at most 1024. Guidance greater than 1.0 enables classifier-free guidance
with the negative prompt, or an empty prompt when none is supplied. Unrecognized settings raise an
error.
Weights. The transformer and Qwen text encoder are published in bfloat16; the catalog lists the published files and the native loaders upcast them to float32 on load. Parity is measured on that upcast.
Memory. The transformer is about 6B parameters and the Qwen text encoder about 7B parameters; real-checkpoint runs require substantial memory and should use shortened step counts.
Seed compatibility. On CPU, the same seed and settings give the same image as diffusers with
generator=torch.Generator("cpu").manual_seed(seed) once the real-checkpoint validation is run.
MPS and CUDA runs are smoke tests only; there is no claim of exact equality on these devices.
Out of scope. Inpainting, image-to-image, video, other checkpoints, other schedulers, precomputed prompt embeddings, batches of several prompts and fp16/bf16 parity are not supported.
License. The repository declares the MIT license. imagehub does not distribute weights.