Discriminative Class Tokens for Text-to-Image Diffusion Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Schwartz, Idan, Snæbjarnarson, Vésteinn, Chefer, Hila, Cotterell, Ryan, Belongie, Serge, Wolf, Lior, Benaim, Sagie
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912182192570368
author Schwartz, Idan
Snæbjarnarson, Vésteinn
Chefer, Hila
Cotterell, Ryan
Belongie, Serge
Wolf, Lior
Benaim, Sagie
author_facet Schwartz, Idan
Snæbjarnarson, Vésteinn
Chefer, Hila
Cotterell, Ryan
Belongie, Serge
Wolf, Lior
Benaim, Sagie
contents Recent advances in text-to-image diffusion models have enabled the generation of diverse and high-quality images. While impressive, the images often fall short of depicting subtle details and are susceptible to errors due to ambiguity in the input text. One way of alleviating these issues is to train diffusion models on class-labeled datasets. This approach has two disadvantages: (i) supervised datasets are generally small compared to large-scale scraped text-image datasets on which text-to-image models are trained, affecting the quality and diversity of the generated images, or (ii) the input is a hard-coded label, as opposed to free-form text, limiting the control over the generated images. In this work, we propose a non-invasive fine-tuning technique that capitalizes on the expressive potential of free-form text while achieving high accuracy through discriminative signals from a pretrained classifier. This is done by iteratively modifying the embedding of an added input token of a text-to-image diffusion model, by steering generated images toward a given target class according to a classifier. Our method is fast compared to prior fine-tuning methods and does not require a collection of in-class images or retraining of a noise-tolerant classifier. We evaluate our method extensively, showing that the generated images are: (i) more accurate and of higher quality than standard diffusion models, (ii) can be used to augment training data in a low-resource setting, and (iii) reveal information about the data used to train the guiding classifier. The code is available at \url{https://github.com/idansc/discriminative_class_tokens}.
format Preprint
id arxiv_https___arxiv_org_abs_2303_17155
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Discriminative Class Tokens for Text-to-Image Diffusion Models
Schwartz, Idan
Snæbjarnarson, Vésteinn
Chefer, Hila
Cotterell, Ryan
Belongie, Serge
Wolf, Lior
Benaim, Sagie
Computer Vision and Pattern Recognition
Artificial Intelligence
Recent advances in text-to-image diffusion models have enabled the generation of diverse and high-quality images. While impressive, the images often fall short of depicting subtle details and are susceptible to errors due to ambiguity in the input text. One way of alleviating these issues is to train diffusion models on class-labeled datasets. This approach has two disadvantages: (i) supervised datasets are generally small compared to large-scale scraped text-image datasets on which text-to-image models are trained, affecting the quality and diversity of the generated images, or (ii) the input is a hard-coded label, as opposed to free-form text, limiting the control over the generated images. In this work, we propose a non-invasive fine-tuning technique that capitalizes on the expressive potential of free-form text while achieving high accuracy through discriminative signals from a pretrained classifier. This is done by iteratively modifying the embedding of an added input token of a text-to-image diffusion model, by steering generated images toward a given target class according to a classifier. Our method is fast compared to prior fine-tuning methods and does not require a collection of in-class images or retraining of a noise-tolerant classifier. We evaluate our method extensively, showing that the generated images are: (i) more accurate and of higher quality than standard diffusion models, (ii) can be used to augment training data in a low-resource setting, and (iii) reveal information about the data used to train the guiding classifier. The code is available at \url{https://github.com/idansc/discriminative_class_tokens}.
title Discriminative Class Tokens for Text-to-Image Diffusion Models
topic Computer Vision and Pattern Recognition
Artificial Intelligence
url https://arxiv.org/abs/2303.17155