/ Модель

Характеристики

Опубликована
29 мая 2024

koala-lightning-700m

Генерация изображенийТекст → изображение3 профессии

Компактная дистиллированная модель ETRI для быстрой генерации изображений 1024×1024 по текстовым запросам.

228скачиваний за 30 дней9лайковвеса обновлены17 окт 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображения» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели сгенерируют результат по каждой задаче. Опубликованный тест появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

KOALA-Lightning-700M — модель генерации изображений по текстовому описанию от ETRI Visual Intelligence Lab. Она предназначена для создания изображений в художественных, дизайнерских и образовательных сценариях, а также для исследований генеративных моделей и их ограничений.

Модель основана на латентной диффузии и использует компактный U-Net примерно на 782 млн параметров вместо U-Net SDXL; текстовые энкодеры сохранены от SDXL-Base-1.0. Заявлена генерация изображений размером 1024×1024, в том числе на потребительских GPU с 8 ГБ видеопамяти. По данным авторов, модель дистиллирована из SDXL-Lightning с акцентом на self-attention и генерирует изображение более чем в четыре раза быстрее SDXL на NVIDIA 4090.

Модель может ошибаться в сложных запросах с несколькими атрибутами и плохо отображает длинный разборчивый текст внутри изображения. Она не предназначена для достоверного изображения людей или событий. Авторы указывают исследовательское назначение; лицензия в предоставленных данных не приведена.

Сценарии применения

  • создание иллюстраций по текстовому описанию
  • быстрое создание концептов для дизайна
  • генерация изображений в творческих и образовательных инструментах
  • исследование ускоренных моделей генерации изображений
  • изучение ограничений и смещений генеративных моделей

Ограничения

Модель может испытывать трудности со сложными запросами, содержащими несколько атрибутов, и с генерацией длинного разборчивого текста внутри изображения. Она не обучалась для достоверного изображения людей или событий.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

KOALA-Lightning-700M Model Card

Summary

  • Trained using a self-attention-based knowledge distillation method
  • Teacher model: SDXL-Lightning
  • Training dataset: a subset of LAION-POP dataset
  • Training iteration: 500K with a batch size of 128
  • Training GPUs: 4 x NVIDIA A100 (80GB)

KOALA-Lightning Models

Modellink
koala-lightning-1bhttps://huggingface.co/etri-vilab/koala-lightning-1b
koala-lightning-700mhttps://huggingface.co/etri-vilab/koala-lightning-700m

Abstract

TL;DR

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.

These 1024x1024 samples were generated by KOALA-Lightning-700M using 10 denoising steps in 0.66 seconds on an NVIDIA 4090 GPU.

Architecture

There are two two types of compressed U-Net, KOALA-1B and KOALA-700M, which are realized by reducing residual blocks and transformer blocks.

U-Net comparison

U-NetSDM-v2.0SDXL-Base-1.0KOALA-1BKOALA-700M
Param.865M2,567M1,161M782M
CKPT size3.46GB10.3GB4.4GB3.0GB
Tx blocks[1, 1, 1, 1][0, 2, 10][0, 2, 6][0, 2, 5]
Mid block✓✓✓✗
Latency1.131s3.133s1.604s1.257s
  • Tx menans transformer block and CKPT means the trained checkpoint file.
  • We measured latency with FP16-precision, and 25 denoising steps in NVIDIA 4090 GPU (24GB).
  • SDM-v2.0 uses 768x768 resolution, while SDXL and KOALA models uses 1024x1024 resolution.

Latency and memory usage comparison on different GPUs

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 our KOALA models can run on all GPU types.

Key Features

  • Efficient U-Net Architecture: KOALA models use a simplified U-Net architecture that reduces the model size by up to 54% and 69% respectively compared to its predecessor, Stable Diffusion XL (SDXL).
  • Self-Attention-Based Knowledge Distillation: The core technique in KOALA focuses on the distillation of self-attention features, which proves crucial for maintaining image generation quality.

Model Description

Usage with 🤗Diffusers library

The inference code with denoising step 25

import torch
from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler

pipe = StableDiffusionXLPipeline.from_pretrained("etri-vilab/koala-lightning-700m", torch_dtype=torch.float16)
pipe = pipe.to("cuda")

# Ensure sampler uses "trailing" timesteps and "sample" prediction type.
pipe.scheduler = EulerDiscreteScheduler.from_config(
    pipe.scheduler.config, timestep_spacing="trailing"
  )


prompt = "A portrait painting of a Golden Retriever like Leonard da Vinci"
negative = "worst quality, low quality, illustration, low resolution"
image = pipe(prompt=prompt, negative_prompt=negative, guidance_scale=3.5, num_inference_steps=10).images[0]

Uses

Direct Use

The model is intended for research purposes only. Possible research areas and tasks include

  • Generation of artworks and use in design and other artistic processes.
  • Applications in educational or creative tools.
  • Research on generative models.
  • Safe deployment of models which have the potential to generate harmful content.
  • Probing and understanding the limitations and biases of generative models.
  • Excluded uses are described below.

Out-of-Scope Use

The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.

Limitations and Bias

  • Text Rendering: The models face challenges in rendering long, legible text within images.
  • Complex Prompts: KOALA sometimes struggles with complex prompts involving multiple attributes.
  • Dataset Dependencies: The current limitations are partially attributed to the characteristics of the training dataset (LAION-aesthetics-V2 6+).

Citation

@misc{Lee@koala,
    title={KOALA: Empirical Lessons Toward Memory-Efficient and Fast Diffusion Models for Text-to-Image Synthesis}, 
    author={Youngwan Lee and Kwanyong Park and Yoorhim Cho and Yong-Ju Lee and Sung Ju Hwang},
    year={2023},
    eprint={2312.04005},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Ревизия весов
358e0e3

0 моделей