Update README.md
Browse files
README.md
CHANGED
@@ -18,6 +18,8 @@ tags:
|
|
18 |
<a href="https://youngwanlee.github.io/KOALA/"><img src="https://img.shields.io/static/v1?label=Project%20Page&message=Github&color=blue&logo=github-pages"></a>  
|
19 |
<a href="https://github.com/youngwanLEE/sdxl-koala"><img src="https://img.shields.io/static/v1?label=Code&message=Github&color=blue&logo=github"></a>  
|
20 |
<a href="https://arxiv.org/abs/2312.04005"><img src="https://img.shields.io/static/v1?label=Paper&message=Arxiv:KOALA&color=red&logo=arxiv"></a>  
|
|
|
|
|
21 |
</div>
|
22 |
|
23 |
|
@@ -40,7 +42,7 @@ tags:
|
|
40 |
|
41 |
## Abstract
|
42 |
### TL;DR
|
43 |
-
> We propose a fast text-to-image model, called KOALA, by compressing SDXL's U-Net and distilling knowledge from SDXL into our model. KOALA-Lightning-700M can generate a 1024x1024 image in 0.
|
44 |
|
45 |
<details><summary>FULL abstract</summary>
|
46 |
As text-to-image (T2I) synthesis models increase in size, they demand higher inference costs due to the need for more expensive GPUs with larger memory, which makes it challenging to reproduce these models in addition to the restricted access to training datasets. Our study aims to reduce these inference costs and explores how far the generative capabilities of T2I models can be extended using only publicly available datasets and open-source models. To this end, by using the de facto standard text-to-image model, Stable Diffusion XL (SDXL), we present three key practices in building an efficient T2I model: (1) Knowledge distillation: we explore how to effectively distill the generation capability of SDXL into an efficient U-Net and find that self-attention is the most crucial part. (2) Data: despite fewer samples, high-resolution images with rich captions are more crucial than a larger number of low-resolution images with short captions. (3) Teacher: Step-distilled Teacher allows T2I models to reduce the noising steps. Based on these findings, we build two types of efficient text-to-image models, called KOALA-Turbo &-Lightning, with two compact U-Nets (1B & 700M), reducing the model size up to 54% and 69% of the SDXL U-Net. In particular, the KOALA-Lightning-700M is 4x faster than SDXL while still maintaining satisfactory generation quality. Moreover, unlike SDXL, our KOALA models can generate 1024px high-resolution images on consumer-grade GPUs with 8GB of VRAMs (3060Ti). We believe that our KOALA models will have a significant practical impact, serving as cost-effective alternatives to SDXL for academic researchers and general users in resource-constrained environments.
|
@@ -80,11 +82,11 @@ There are two two types of compressed U-Net, KOALA-1B and KOALA-700M, which are
|
|
80 |
|
81 |
## Latency and memory usage comparison on different GPUs
|
82 |
|
83 |
-
We
|
84 |
|
85 |
|
86 |
<div align="center">
|
87 |
-
<img src="https://dl.
|
88 |
</div>
|
89 |
|
90 |
|
@@ -129,7 +131,7 @@ pipe.scheduler = EulerDiscreteScheduler.from_config(
|
|
129 |
prompt = "A portrait painting of a Golden Retriever like Leonard da Vinci"
|
130 |
negative = "worst quality, low quality, illustration, low resolution"
|
131 |
image = pipe(prompt=prompt, negative_prompt=negative, guidance_scale=3.5, num_inference_steps=10).images[0]
|
132 |
-
|
133 |
```
|
134 |
|
135 |
|
|
|
18 |
<a href="https://youngwanlee.github.io/KOALA/"><img src="https://img.shields.io/static/v1?label=Project%20Page&message=Github&color=blue&logo=github-pages"></a>  
|
19 |
<a href="https://github.com/youngwanLEE/sdxl-koala"><img src="https://img.shields.io/static/v1?label=Code&message=Github&color=blue&logo=github"></a>  
|
20 |
<a href="https://arxiv.org/abs/2312.04005"><img src="https://img.shields.io/static/v1?label=Paper&message=Arxiv:KOALA&color=red&logo=arxiv"></a>  
|
21 |
+
<a href="https://colab.research.google.com/drive/16gBq2J4fo8xCgmWaBvrqnEb-liAz6097?usp=sharing"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Demo In Colab"/>
|
22 |
+
</a>  
|
23 |
</div>
|
24 |
|
25 |
|
|
|
42 |
|
43 |
## Abstract
|
44 |
### TL;DR
|
45 |
+
> We propose a fast text-to-image model, called KOALA, by compressing SDXL's U-Net and distilling knowledge from SDXL into our model. KOALA-Lightning-700M can generate a 1024x1024 image in 0.66 seconds on an NVIDIA 4090 GPU, which is more than 4x faster than SDXL. KOALA-700M can be used as a cost-effective alternative between SDM and SDXL in limited resources.
|
46 |
|
47 |
<details><summary>FULL abstract</summary>
|
48 |
As text-to-image (T2I) synthesis models increase in size, they demand higher inference costs due to the need for more expensive GPUs with larger memory, which makes it challenging to reproduce these models in addition to the restricted access to training datasets. Our study aims to reduce these inference costs and explores how far the generative capabilities of T2I models can be extended using only publicly available datasets and open-source models. To this end, by using the de facto standard text-to-image model, Stable Diffusion XL (SDXL), we present three key practices in building an efficient T2I model: (1) Knowledge distillation: we explore how to effectively distill the generation capability of SDXL into an efficient U-Net and find that self-attention is the most crucial part. (2) Data: despite fewer samples, high-resolution images with rich captions are more crucial than a larger number of low-resolution images with short captions. (3) Teacher: Step-distilled Teacher allows T2I models to reduce the noising steps. Based on these findings, we build two types of efficient text-to-image models, called KOALA-Turbo &-Lightning, with two compact U-Nets (1B & 700M), reducing the model size up to 54% and 69% of the SDXL U-Net. In particular, the KOALA-Lightning-700M is 4x faster than SDXL while still maintaining satisfactory generation quality. Moreover, unlike SDXL, our KOALA models can generate 1024px high-resolution images on consumer-grade GPUs with 8GB of VRAMs (3060Ti). We believe that our KOALA models will have a significant practical impact, serving as cost-effective alternatives to SDXL for academic researchers and general users in resource-constrained environments.
|
|
|
82 |
|
83 |
## Latency and memory usage comparison on different GPUs
|
84 |
|
85 |
+
We measured the inference time of SDXL-Turbo and KOALA-Turbo models at a resolution of 512x512, and other models at 1024x1024, using a variety of consumer-grade GPUs: NVIDIA 3060Ti (8GB), 2080Ti (11GB), and 4090 (24GB). 'OOM' indicates Out-of-Memory. Note that SDXL models cannot operate on the 3060Ti with 8GB VRAM, whereas <b>our KOALA models can run on all GPU types.</b>
|
86 |
|
87 |
|
88 |
<div align="center">
|
89 |
+
<img src="https://dl.dropbox.com/scl/fi/eif4cuazx64chd2ybm32w/latency_memory_labels_anno_wide.png?rlkey=otev2ujcn1jekvqre5jksg2e5&dl=1" width="1024px" />
|
90 |
</div>
|
91 |
|
92 |
|
|
|
131 |
prompt = "A portrait painting of a Golden Retriever like Leonard da Vinci"
|
132 |
negative = "worst quality, low quality, illustration, low resolution"
|
133 |
image = pipe(prompt=prompt, negative_prompt=negative, guidance_scale=3.5, num_inference_steps=10).images[0]
|
134 |
+
|
135 |
```
|
136 |
|
137 |
|