/ Модель

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

Лицензия
OpenRAIL++
Базовая модель
stable-diffusion-xl-base-1.0
Опубликована
1 сен 2023

stable-diffusion-xl-1.0-inpainting-0.1

Преобразование изображенийИзображение, текст → изображение3 профессии

SD-XL Inpainting 0.1 генерирует изображения по тексту и редактирует выбранные маской области на основе Stable Diffusion XL.

94 756скачиваний за 30 дней388лайковвеса обновлены3 сен 2023

Бенчмарки

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

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

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

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

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

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

SD-XL Inpainting 0.1 — модель генерации и редактирования изображений, разработанная командой Diffusers и дообученная на весах Stable Diffusion XL Base 1.0. Это латентная диффузионная модель с двумя предобученными текстовыми энкодерами OpenCLIP-ViT/G и CLIP-ViT/L. Для inpainting в UNet добавлены входные каналы для закодированного изображения с маской и самой маски; обучение проводилось 40 тыс. шагов при разрешении 1024×1024.

Модель создаёт изображения по текстовому описанию и изменяет области изображения, заданные маской. Она подходит для художественной генерации, дизайна и творческих инструментов. Лицензия — CreativeML Open RAIL++-M License.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

SD-XL Inpainting 0.1 Model Card

inpaint-example

SD-XL Inpainting 0.1 is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask.

The SD-XL Inpainting 0.1 was initialized with the stable-diffusion-xl-base-1.0 weights. The model is trained for 40k steps at resolution 1024x1024 and 5% dropping of the text-conditioning to improve classifier-free classifier-free guidance sampling. For inpainting, the UNet has 5 additional input channels (4 for the encoded masked-image and 1 for the mask itself) whose weights were zero-initialized after restoring the non-inpainting checkpoint. During training, we generate synthetic masks and, in 25% mask everything.

How to use

from diffusers import AutoPipelineForInpainting
from diffusers.utils import load_image
import torch

pipe = AutoPipelineForInpainting.from_pretrained("diffusers/stable-diffusion-xl-1.0-inpainting-0.1", torch_dtype=torch.float16, variant="fp16").to("cuda")

img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"

image = load_image(img_url).resize((1024, 1024))
mask_image = load_image(mask_url).resize((1024, 1024))

prompt = "a tiger sitting on a park bench"
generator = torch.Generator(device="cuda").manual_seed(0)

image = pipe(
  prompt=prompt,
  image=image,
  mask_image=mask_image,
  guidance_scale=8.0,
  num_inference_steps=20,  # steps between 15 and 30 work well for us
  strength=0.99,  # make sure to use `strength` below 1.0
  generator=generator,
).images[0]

How it works:

imagemask_image
promptOutput
a tiger sitting on a park bench

Model Description

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

Limitations

  • The model does not achieve perfect photorealism
  • The model cannot render legible text
  • The model struggles with more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere”
  • Faces and people in general may not be generated properly.
  • The autoencoding part of the model is lossy.
  • When the strength parameter is set to 1 (i.e. starting in-painting from a fully masked image), the quality of the image is degraded. The model retains the non-masked contents of the image, but images look less sharp. We're investing this and working on the next version.

Bias

While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.

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

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

GPU в ailist

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

Нельзя запустить

Модели «картинка → картинка» пока не запускаются.

Ревизия весов
115134f

0 моделей