Skip to main content
QUICK REVIEW

[Paper Review] Text-Guided Synthesis of Artistic Images with Retrieval-Augmented Diffusion Models

Robin Rombach, Andreas Blattmann|arXiv (Cornell University)|Jul 26, 2022
Advanced Image and Video Retrieval TechniquesComputer Science34 citations
TL;DR

The paper demonstrates zero-shot text-guided stylization of diffusion models by replacing the retrieval database at inference time with style-specific image collections, enabling artistic image synthesis without retraining and outperforming postfix-based prompts in fine-grained stylization. It provides LAION- and WikiArt/ArtBench–based setups and open-sources code/model weights.

ABSTRACT

Novel architectures have recently improved generative image synthesis leading to excellent visual quality in various tasks. Of particular note is the field of ``AI-Art'', which has seen unprecedented growth with the emergence of powerful multimodal models such as CLIP. By combining speech and image synthesis models, so-called ``prompt-engineering'' has become established, in which carefully selected and composed sentences are used to achieve a certain visual style in the synthesized image. In this note, we present an alternative approach based on retrieval-augmented diffusion models (RDMs). In RDMs, a set of nearest neighbors is retrieved from an external database during training for each training instance, and the diffusion model is conditioned on these informative samples. During inference (sampling), we replace the retrieval database with a more specialized database that contains, for example, only images of a particular visual style. This provides a novel way to prompt a general trained model after training and thereby specify a particular visual style. As shown by our experiments, this approach is superior to specifying the visual style within the text prompt. We open-source code and model weights at https://github.com/CompVis/latent-diffusion .

Motivation & Objective

  • Motivate a controllable, post-hoc stylization approach for diffusion models that reduces the need for retraining.
  • Leverage retrieval-augmented diffusion models (RDMs) to condition generation on informative image samples from external databases.
  • Show that swapping the training-style database at inference enables fine-grained style control.
  • Demonstrate that CLIP-based text–image space enables natural language–driven style specification.

Proposed method

  • Use retrieval-augmented diffusion models trained on OpenImages (ImageNet replica) or LAION-2B-en as the training database.
  • Replace the training database with style-specific datasets (WikiArt) or ArtBench style subsets during inference to achieve stylization.
  • Query the CLIP image embedding space to retrieve k nearest neighbors (k=19) from the style database for conditioning.
  • Condition diffusion via cross-attention on retrieved CLIP embeddings during training and inference.
  • Evaluate stylization quality with a style classifier trained on ArtBench to compare against postfix-based prompts.
  • Provide open-source code and model weights for reproducibility.

Experimental results

Research questions

  • RQ1Can retrieval-augmented diffusion models achieve zero-shot stylization by swapping external databases at inference time?
  • RQ2Does CLIP-based retrieval enable fine-grained, style-specific control over generated art without additional training?
  • RQ3How does retrieval-based stylization compare to traditional postfix-style prompts in accuracy and style discernment?
  • RQ4What is the impact of using different style datasets (WikiArt, ArtBench) on synthesis quality and controllability?

Key findings

  • Zero-shot stylization is achievable by exchanging the training database with a style-specific database at inference.
  • Retrieval-based stylization outperforms postfix-based style prompts in fine-grained style control across tested art styles.
  • A style classifier trained on ArtBench achieves higher alignment with retrieved styles than postfix-based prompts (quantitative comparison shown).
  • Two model configurations were explored: an ImageNet-like RDM and a larger LAION-2B-en-based RDM with compatible retrieval settings (k=19 neighbors).
  • The approach supports post-hoc styling without retraining and enables targeted stylization via specialized databases (WikiArt, ArtBench).
  • Code and model weights are released for artists to extend and evaluate the method.

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.