IP-Adapter: Textkompatibler Bildprompt-Adapter für Text-zu-Bild-Diffusionsmodelle
IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Models
August 13, 2023
Autoren: Hu Ye, Jun Zhang, Sibo Liu, Xiao Han, Wei Yang
cs.AI
Zusammenfassung
In den letzten Jahren haben große Text-zu-Bild-Diffusionsmodelle ihre beeindruckende generative Fähigkeit unter Beweis gestellt, hochwertige Bilder zu erzeugen. Es ist jedoch sehr schwierig, gewünschte Bilder allein mit Textprompts zu generieren, da dies oft komplexes Prompt-Engineering erfordert. Eine Alternative zum Textprompt ist das Bildprompt, nach dem Motto: „Ein Bild sagt mehr als tausend Worte“. Obwohl bestehende Methoden des direkten Fine-Tunings vortrainierter Modelle effektiv sind, erfordern sie große Rechenressourcen und sind nicht kompatibel mit anderen Basismodellen, Textprompts und strukturellen Steuerungen. In diesem Artikel stellen wir IP-Adapter vor, einen effektiven und leichtgewichtigen Adapter, der die Bildprompt-Fähigkeit für vortrainierte Text-zu-Bild-Diffusionsmodelle ermöglicht. Das Schlüsseldesign unseres IP-Adapters ist ein entkoppelter Cross-Attention-Mechanismus, der die Cross-Attention-Schichten für Text- und Bildmerkmale trennt. Trotz der Einfachheit unserer Methode kann ein IP-Adapter mit nur 22M Parametern eine vergleichbare oder sogar bessere Leistung als ein vollständig feinabgestimmtes Bildprompt-Modell erzielen. Da wir das vortrainierte Diffusionsmodell einfrieren, kann der vorgeschlagene IP-Adapter nicht nur auf andere benutzerdefinierte Modelle, die aus demselben Basismodell feinabgestimmt wurden, sondern auch auf kontrollierbare Generierung mit bestehenden Steuerungswerkzeugen verallgemeinert werden. Dank der entkoppelten Cross-Attention-Strategie kann das Bildprompt auch gut mit dem Textprompt zusammenarbeiten, um multimodale Bildgenerierung zu erreichen. Die Projektseite ist unter https://ip-adapter.github.io verfügbar.
English
Recent years have witnessed the strong power of large text-to-image diffusion
models for the impressive generative capability to create high-fidelity images.
However, it is very tricky to generate desired images using only text prompt as
it often involves complex prompt engineering. An alternative to text prompt is
image prompt, as the saying goes: "an image is worth a thousand words".
Although existing methods of direct fine-tuning from pretrained models are
effective, they require large computing resources and are not compatible with
other base models, text prompt, and structural controls. In this paper, we
present IP-Adapter, an effective and lightweight adapter to achieve image
prompt capability for the pretrained text-to-image diffusion models. The key
design of our IP-Adapter is decoupled cross-attention mechanism that separates
cross-attention layers for text features and image features. Despite the
simplicity of our method, an IP-Adapter with only 22M parameters can achieve
comparable or even better performance to a fully fine-tuned image prompt model.
As we freeze the pretrained diffusion model, the proposed IP-Adapter can be
generalized not only to other custom models fine-tuned from the same base
model, but also to controllable generation using existing controllable tools.
With the benefit of the decoupled cross-attention strategy, the image prompt
can also work well with the text prompt to achieve multimodal image generation.
The project page is available at https://ip-adapter.github.io.