/ Модель

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

Лицензия
OpenRAIL++
Опубликована
17 мая 2023

stable-diffusion-2-1-unclip-img2img

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

Дообученная на основе Stable Diffusion 2.1 латентная диффузионная модель создаёт вариации изображений по CLIP-представлению исходного изображения и текстовому запросу.

417скачиваний за 30 дней5лайковвеса обновлены17 мая 2023

Бенчмарки

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

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

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

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

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

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

radames/stable-diffusion-2-1-unclip-img2img — Stable Diffusion 2.1 UnCLIP, дообученная версия Stable Diffusion 2.1, связанная с разработчиками Robin Rombach и Patrick Esser. Это латентная диффузионная модель для преобразования изображений: она принимает изображение через его CLIP-эмбеддинг, в том числе с настраиваемым уровнем шума, и текстовый запрос, чтобы создавать вариации исходного изображения. Модель также можно объединять в цепочку с текстово-графическими CLIP-приорами. Для работы предназначена библиотека Diffusers; файлы представлены в форматах Diffusers, PyTorch и safetensors.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Stable Diffusion v2-1-unclip Model Card

This model card focuses on the model associated with the Stable Diffusion v2-1 model, codebase available here.

This stable-diffusion-2-1-unclip is a finetuned version of Stable Diffusion 2.1, modified to accept (noisy) CLIP image embedding in addition to the text prompt, and can be used to create image variations (Examples) or can be chained with text-to-image CLIP priors. The amount of noise added to the image embedding can be specified via the noise_level (0 means no noise, 1000 full noise).

Model Details

  • Developed by: Robin Rombach, Patrick Esser

  • Model type: Diffusion-based text-to-image generation model

  • Language(s): English

  • License: CreativeML Open RAIL++-M License

  • Model Description: This is a model that can be used to generate and modify images based on text prompts. It is a Latent Diffusion Model that uses a fixed, pretrained text encoder (OpenCLIP-ViT/H).

  • Resources for more information: GitHub Repository.

  • Cite as:

    @InProceedings{Rombach_2022_CVPR,
        author    = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
        title     = {High-Resolution Image Synthesis With Latent Diffusion Models},
        booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
        month     = {June},
        year      = {2022},
        pages     = {10684-10695}
    }
    

Examples

Using the 🤗's Diffusers library to run Stable Diffusion UnCLIP 2-1-small in a simple and efficient manner.

pip install diffusers transformers accelerate scipy safetensors

Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to DPMSolverMultistepScheduler):

from diffusers import DiffusionPipeline
from diffusers.utils import load_image
import torch

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-unclip-small", torch_dtype=torch.float16)
pipe.to("cuda")

# get image
url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/stable_unclip/tarsila_do_amaral.png"
image = load_image(url)

# run image variation
image = pipe(image).images[0]

img

Uses

Direct Use

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

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

Excluded uses are described below.

Misuse, Malicious Use, and Out-of-Scope Use

Note: This section is originally taken from the DALLE-MINI model card, was used for Stable Diffusion v1, but applies in the same way to Stable Diffusion v2.

The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes.

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.

Misuse and Malicious Use

Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:

  • Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc.
  • Intentionally promoting or propagating discriminatory content or harmful stereotypes.
  • Impersonating individuals without their consent.
  • Sexual content without consent of the people who might see it.
  • Mis- and disinformation
  • Representations of egregious violence and gore
  • Sharing of copyrighted or licensed material in violation of its terms of use.
  • Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use.

Limitations and Bias

Limitations

  • The model does not achieve perfect photorealism
  • The model cannot render legible text
  • The model does not perform well on 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 model was trained mainly with English captions and will not work as well in other languages.
  • The autoencoding part of the model is lossy
  • The model was trained on a subset of the large-scale dataset LAION-5B, which contains adult, violent and sexual content. To partially mitigate this, we have filtered the dataset using LAION's NFSW detector (see Training section).

Bias

While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. Stable Diffusion was primarily trained on subsets of LAION-2B(en), which consists of images that are limited to English descriptions. Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as white and western cultures are often set as the default. Further, the ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts. Stable Diffusion v2 mirrors and exacerbates biases to such a degree that viewer discretion must be advised irrespective of the input or its intent.

Training

Training Data The model developers used the following dataset for training the model:

  • LAION-5B and subsets (details below). The training data is further filtered using LAION's NSFW detector, with a "p_unsafe" score of 0.1 (conservative). For more details, please refer to LAION-5B's NeurIPS 2022 paper and reviewer discussions on the topic.

Environmental Impact

Stable Diffusion v1 Estimated Emissions Based on that information, we estimate the following CO2 emissions using the Machine Learning Impact calculator presented in Lacoste et al. (2019). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact.

  • Hardware Type: A100 PCIe 40GB
  • Hours used: 200000
  • Cloud Provider: AWS
  • Compute Region: US-east
  • Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid): 15000 kg CO2 eq.

Citation

@InProceedings{Rombach_2022_CVPR,
    author    = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
    title     = {High-Resolution Image Synthesis With Latent Diffusion Models},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {10684-10695}
}

This model card was written by: Robin Rombach, Patrick Esser and David Ha and is based on the Stable Diffusion v1 and DALL-E Mini model card.

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

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

GPU в ailist

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

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

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

Ревизия весов
0389858

0 моделей