Views
No views yet



./examples folder1from kandinsky3 import get_T2I_Flash_pipeline
2
3device_map = torch.device('cuda:0')
4dtype_map = {
5 'unet': torch.float32,
6 'text_encoder': torch.float16,
7 'movq': torch.float32,
8}
9
10t2i_pipe = get_T2I_Flash_pipeline(
11 device_map, dtype_map
12)
13
14res = t2i_pipe("A cute corgi lives in a house made out of sushi.")
### System: You are a prompt engineer. Your mission is to expand prompts written by user. You should provide the best prompt for text to image generation in English.
### User:
{prompt}
### Assistant:
{answer of the model}


conda create -n kandinsky -y python=3.8;
source activate kandinsky;
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu113/torch_stable.html;
pip install -r requirements.txt;pip freeze and can be found in exact_requirements.txt./examples folder1import sys
2sys.path.append('..')
3
4import torch
5from kandinsky3 import get_T2I_pipeline
6
7device_map = torch.device('cuda:0')
8dtype_map = {
9 'unet': torch.float32,
10 'text_encoder': torch.float16,
11 'movq': torch.float32,
12}
13
14t2i_pipe = get_T2I_pipeline(
15 device_map, dtype_map,
16)
17res = t2i_pipe("A cute corgi lives in a house made out of sushi.")
18
19res[0]1from kandinsky3 import get_inpainting_pipeline
2
3device_map = torch.device('cuda:0')
4dtype_map = {
5 'unet': torch.float16,
6 'text_encoder': torch.float16,
7 'movq': torch.float32,
8}
9
10pipe = get_inpainting_pipeline(
11 device_map, dtype_map,
12)
13
14image = ... # PIL Image
15mask = ... # Numpy array (HxW). Set 1 where image should be masked
16image = inp_pipe( "A cute corgi lives in a house made out of sushi.", image, mask)![]() | ![]() | ![]() | ![]() |
| "A beautiful landscape outdoors scene in the crochet knitting art style, drawing in style by Alfons Mucha" | "gorgeous phoenix, cosmic, darkness, epic, cinematic, moonlight, stars, high - definition, texture,Oscar-Claude Monet" | "a yellow house at the edge of the danish fjord, in the style of eiko ojala, ingrid baars, ad posters, mountainous vistas, george ault, realistic details, dark white and dark gray, 4k" | "dragon fruit head, upper body, realistic, illustration by Joshua Hoffine Norman Rockwell, scary, creepy, biohacking, futurism, Zaha Hadid style" |
![]() | ![]() | ![]() | ![]() |
| "Amazing playful nice cute strawberry character, dynamic poze, surreal fantazy garden background, gorgeous masterpice, award winning photo, soft natural lighting, 3d, Blender, Octane render, tilt - shift, deep field, colorful, I can't believe how beautiful this is, colorful, cute and sweet baby - loved photo" | "beautiful fairy-tale desert, in the sky a wave of sand merges with the milky way, stars, cosmism, digital art, 8k" | "Car, mustang, movie, person, poster, car cover, person, in the style of alessandro gottardo, gold and cyan, gerald harvey jones, reflections, highly detailed illustrations, industrial urban scenes"" | "cloud in blue sky, a red lip, collage art, shuji terayama, dreamy objects, surreal, criterion collection, showa era, intricate details, mirror" |
@inproceedings{vladimir-etal-2024-kandinsky,
title = "Kandinsky 3: Text-to-Image Synthesis for Multifunctional Generative Framework",
author = "Vladimir, Arkhipkin and
Vasilev, Viacheslav and
Filatov, Andrei and
Pavlov, Igor and
Agafonova, Julia and
Gerasimenko, Nikolai and
Averchenkova, Anna and
Mironova, Evelina and
Anton, Bukashkin and
Kulikov, Konstantin and
Kuznetsov, Andrey and
Dimitrov, Denis",
editor = "Hernandez Farias, Delia Irazu and
Hope, Tom and
Li, Manling",
booktitle = "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
month = nov,
year = "2024",
address = "Miami, Florida, USA",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.emnlp-demo.48",
pages = "475--485",
abstract = "Text-to-image (T2I) diffusion models are popular for introducing image manipulation methods, such as editing, image fusion, inpainting, etc. At the same time, image-to-video (I2V) and text-to-video (T2V) models are also built on top of T2I models. We present Kandinsky 3, a novel T2I model based on latent diffusion, achieving a high level of quality and photorealism. The key feature of the new architecture is the simplicity and efficiency of its adaptation for many types of generation tasks. We extend the base T2I model for various applications and create a multifunctional generation system that includes text-guided inpainting/outpainting, image fusion, text-image fusion, image variations generation, I2V and T2V generation. We also present a distilled version of the T2I model, evaluating inference in 4 steps of the reverse process without reducing image quality and 3 times faster than the base model. We deployed a user-friendly demo system in which all the features can be tested in the public domain. Additionally, we released the source code and checkpoints for the Kandinsky 3 and extended models. Human evaluations show that Kandinsky 3 demonstrates one of the highest quality scores among open source generation systems.",
}@misc{arkhipkin2023kandinsky,
title={Kandinsky 3.0 Technical Report},
author={Vladimir Arkhipkin and Andrei Filatov and Viacheslav Vasilev and Anastasia Maltseva and Said Azizov and Igor Pavlov and Julia Agafonova and Andrey Kuznetsov and Denis Dimitrov},
year={2023},
eprint={2312.03511},
archivePrefix={arXiv},
primaryClass={cs.CV}
}