File size: 2,984 Bytes
19a84a7
 
 
 
 
 
 
 
 
4b76968
c091b84
6b423a9
c091b84
4b76968
 
 
c091b84
4b76968
c091b84
4b76968
c091b84
4b76968
c091b84
 
 
 
4b76968
 
 
c091b84
 
 
 
4b76968
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c091b84
 
 
 
 
4b76968
c091b84
 
 
 
 
4b76968
c091b84
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
language:
- ru
- en
tags:
- PyTorch
thumbnail: "https://github.com/ai-forever/KandiSuperRes/"
---

# KandiSuperRes - diffusion model for super resolution

[KandiSuperRes Flash Post](https://habr.com/ru/companies/sberbank/articles/837192/) | [KandiSuperRes Post](https://habr.com/ru/companies/sberbank/articles/805337/) | [Github](https://github.com/ai-forever/KandiSuperRes/) | [Telegram-bot](https://t.me/kandinsky21_bot) | [Our text-to-image model](https://github.com/ai-forever/Kandinsky-3/tree/main)

## KandiSuperRes Flash

![](title_flash.gif)

### Description

KandiSuperRes Flash is a new version of the diffusion model for super resolution. This model includes a distilled version of the KandiSuperRes model and a distilled model [Kandinsky 3.0 Flash](https://github.com/ai-forever/Kandinsky-3/tree/main). KandiSuperRes Flash not only improves image clarity, but also corrects artifacts, draws details, improves image aesthetics. And one of the most important advantages is the ability to use the model in the "infinite super resolution" mode. For more information: details of architecture and training, example of generations check out our [Habr post](https://habr.com/ru/companies/sberbank/articles/805337/).

### Installing

To install repo first one need to create conda environment:

```
git clone https://github.com/ai-forever/KandiSuperRes.git
cd KandiSuperRes
conda create -n kandisuperres -y python=3.12;
source activate kandisuperres;
pip install -r requirements.txt;
```

### How to use

Check our jupyter notebook `KandiSuperRes.ipynb` with example. 

```python
from KandiSuperRes import get_SR_pipeline
from PIL import Image

sr_pipe = get_SR_pipeline(device='cuda', fp16=True, flash=True, scale=2)

lr_image = Image.open('')
sr_image = sr_pipe(lr_image)
```

## KandiSuperRes

![](title.png)

### Description

KandiSuperRes is an open-source diffusion model for x4 super resolution. This model is based on the [Kandinsky 3.0](https://github.com/ai-forever/Kandinsky-3/tree/main) architecture with some modifications. For generation in 4K, the [MultiDiffusion](https://arxiv.org/pdf/2302.08113.pdf) algorithm was used, which allows to generate panoramic images. For more information: details of architecture and training, example of generations check out our [Habr post](https://habr.com/ru/companies/sberbank/articles/805337/).

### How to use

Check our jupyter notebook `KandiSuperRes.ipynb` with example. 

```python
from KandiSuperRes import get_SR_pipeline
from PIL import Image

sr_pipe = get_SR_pipeline(device='cuda', fp16=True, flash=False, scale=4)

lr_image = Image.open('')
sr_image = sr_pipe(lr_image)
```

### Authors
+ Anastasia Maltseva [Github](https://github.com/NastyaMittseva)
+ Vladimir Arkhipkin: [Github](https://github.com/oriBetelgeuse)
+ Andrey Kuznetsov: [Github](https://github.com/kuznetsoffandrey), [Blog](https://t.me/complete_ai)
+ Denis Dimitrov: [Github](https://github.com/denndimitrov), [Blog](https://t.me/dendi_math_ai)