Toffee: Costruzione Efficiente di Dataset su Scala Milionaria per la Generazione di Immagini da Testo Guidata dal Soggetto
Toffee: Efficient Million-Scale Dataset Construction for Subject-Driven Text-to-Image Generation
June 13, 2024
Autori: Yufan Zhou, Ruiyi Zhang, Kaizhi Zheng, Nanxuan Zhao, Jiuxiang Gu, Zichao Wang, Xin Eric Wang, Tong Sun
cs.AI
Abstract
Nella generazione di immagini da testo guidata da soggetti, i lavori recenti hanno ottenuto prestazioni superiori addestrando il modello su dataset sintetici contenenti numerose coppie di immagini. Addestrati su questi dataset, i modelli generativi possono produrre immagini allineate al testo per un soggetto specifico a partire da immagini di test arbitrarie in modalità zero-shot. Questi modelli superano persino i metodi che richiedono un ulteriore fine-tuning sulle immagini di test. Tuttavia, il costo di creazione di tali dataset è proibitivo per la maggior parte dei ricercatori. Per generare una singola coppia di addestramento, i metodi attuali eseguono il fine-tuning di un modello pre-addestrato di generazione di immagini da testo sull'immagine del soggetto per catturare dettagli fini, quindi utilizzano il modello fine-tuned per creare immagini dello stesso soggetto basate su prompt testuali creativi. Di conseguenza, la costruzione di un dataset su larga scala con milioni di soggetti può richiedere centinaia di migliaia di ore di GPU. Per affrontare questo problema, proponiamo Toffee, un metodo efficiente per costruire dataset per l'editing e la generazione guidata da soggetti. Nello specifico, la nostra costruzione del dataset non richiede alcun fine-tuning a livello di soggetto. Dopo il pre-addestramento di due modelli generativi, siamo in grado di generare un numero infinito di campioni di alta qualità. Abbiamo costruito il primo dataset su larga scala per l'editing e la generazione di immagini guidata da soggetti, che contiene 5 milioni di coppie di immagini, prompt testuali e maschere. Il nostro dataset è 5 volte più grande del precedente dataset più ampio, eppure il nostro costo è inferiore di decine di migliaia di ore di GPU. Per testare il dataset proposto, proponiamo anche un modello in grado sia di editing che di generazione di immagini guidata da soggetti. Addestrando semplicemente il modello sul nostro dataset proposto, si ottengono risultati competitivi, dimostrando l'efficacia del framework proposto per la costruzione del dataset.
English
In subject-driven text-to-image generation, recent works have achieved
superior performance by training the model on synthetic datasets containing
numerous image pairs. Trained on these datasets, generative models can produce
text-aligned images for specific subject from arbitrary testing image in a
zero-shot manner. They even outperform methods which require additional
fine-tuning on testing images. However, the cost of creating such datasets is
prohibitive for most researchers. To generate a single training pair, current
methods fine-tune a pre-trained text-to-image model on the subject image to
capture fine-grained details, then use the fine-tuned model to create images
for the same subject based on creative text prompts. Consequently, constructing
a large-scale dataset with millions of subjects can require hundreds of
thousands of GPU hours. To tackle this problem, we propose Toffee, an efficient
method to construct datasets for subject-driven editing and generation.
Specifically, our dataset construction does not need any subject-level
fine-tuning. After pre-training two generative models, we are able to generate
infinite number of high-quality samples. We construct the first large-scale
dataset for subject-driven image editing and generation, which contains 5
million image pairs, text prompts, and masks. Our dataset is 5 times the size
of previous largest dataset, yet our cost is tens of thousands of GPU hours
lower. To test the proposed dataset, we also propose a model which is capable
of both subject-driven image editing and generation. By simply training the
model on our proposed dataset, it obtains competitive results, illustrating the
effectiveness of the proposed dataset construction framework.