Skip to main content
QUICK REVIEW

[Paper Review] In-Context Learning Unlocked for Diffusion Models

Zhendong Wang, Yifan Jiang|arXiv (Cornell University)|May 1, 2023
Multimodal Machine Learning ApplicationsComputer Science12 citations
TL;DR

Prompt Diffusion enables in-context learning for diffusion-based generative models via a vision-language prompt trained on six tasks, enabling unseen task generalization and text-guided editing.

ABSTRACT

We present Prompt Diffusion, a framework for enabling in-context learning in diffusion-based generative models. Given a pair of task-specific example images, such as depth from/to image and scribble from/to image, and a text guidance, our model automatically understands the underlying task and performs the same task on a new query image following the text guidance. To achieve this, we propose a vision-language prompt that can model a wide range of vision-language tasks and a diffusion model that takes it as input. The diffusion model is trained jointly over six different tasks using these prompts. The resulting Prompt Diffusion model is the first diffusion-based vision-language foundation model capable of in-context learning. It demonstrates high-quality in-context generation on the trained tasks and generalizes effectively to new, unseen vision tasks with their respective prompts. Our model also shows compelling text-guided image editing results. Our framework aims to facilitate research into in-context learning for computer vision. We share our code and pre-trained models at https://github.com/Zhendong-Wang/Prompt-Diffusion.

Motivation & Objective

  • Motivate the need for in-context learning in vision tasks beyond NLP.
  • Propose a vision-language prompt design to couple task examples with queries.
  • Develop Prompt Diffusion to be a diffusion-based vision-language foundation model.
  • Demonstrate in-context learning and generalization to unseen tasks.
  • Showcase controllable text-guided image editing capabilities.

Proposed method

  • Introduce a multimodal vision-language prompt that encodes text guidance, an example pair (image1 -> image2), and an image-query (image3) to produce a target image4.
  • Build Prompt Diffusion by adapting ControlNet and Stable Diffusion architectures to accept the vision-language prompt.
  • Finetune Prompt Diffusion from a Stable Diffusion v1.5 checkpoint on six vision-language tasks (three forward, three inverse).
  • Train jointly on tasks with random sampling of prompts to foster in-context learning across multiple domains.
  • Apply classifier-free guidance with 10% text guidance dropout during training to improve robustness.
  • Evaluate both qualitatively and quantitatively using zero-shot FID for inverse tasks and RMSE for forward tasks.

Experimental results

Research questions

  • RQ1Can a diffusion-based model learn to perform multiple vision-language tasks from a single vision-language prompt?
  • RQ2Does joint multi-task finetuning enable generalization to unseen vision-language tasks without task-specific finetuning?
  • RQ3Can text-guided editing be controlled reliably via prompts in this framework?
  • RQ4How does Prompt Diffusion compare to task-specific baselines on trained tasks and how well does it generalize to new tasks?

Key findings

  • Prompt Diffusion achieves high-quality in-context generation for trained tasks and generalizes effectively to unseen tasks via prompts.
  • On inverse tasks, Prompt Diffusion attains competitive zero-shot FID versus CN(FT).
  • On forward tasks, Prompt Diffusion achieves RMSE comparable to or better than baselines on several metrics.
  • The model supports controllable image editing driven by text guidance and image conditions.
  • Joint training across six tasks is effective for learning cross-task correspondences and in-context abilities.
  • Qualitative results demonstrate generalization to tasks like style transfer and misaligned example pairs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.