I Dream My Painting: Connecting MLLMs and Diffusion Models via Prompt Generation for Text-Guided Multi-Mask Inpainting

Nicola Fanelli, Gennaro Vessio, Giovanna Castellano
11/28/2024
cs.CV

No official code found. Best implementation: cilabuniba/i-dream-my-painting (18 stars, MIT, last commit 2025-12-29).

Abstract

Inpainting focuses on filling missing or corrupted regions of an image to blend seamlessly with its surrounding content and style. While conditional diffusion models have proven effective for text-guided inpainting, we introduce the novel task of multi-mask inpainting, where multiple regions are simultaneously inpainted using distinct prompts. Furthermore, we design a fine-tuning procedure for multimodal LLMs, such as LLaVA, to generate multi-mask prompts automatically using corrupted images as inputs. These models can generate helpful and detailed prompt suggestions for filling the masked regions. The generated prompts are then fed to Stable Diffusion, which is fine-tuned for the multi-mask inpainting problem using rectified cross-attention, enforcing prompts onto their designated regions for filling. Experiments on digitized paintings from WikiArt and the Densely Captioned Images dataset demonstrate that our pipeline delivers creative and accurate inpainting results. Our code, data, and trained models are available at https://cilabuniba.github.io/i-dream-my-painting.

View on arXivView PDF

Code Implementations(1)

MIT

[WACV 2025] I Dream My Painting: Connecting MLLMs and Diffusion Models via Prompt Generation for Text-Guided Multi-Mask Inpainting

180Python, Jupyter NotebookDec 2, 20249 months agoMIT
computer-visiondiffusioninpaintingllavamllm+4 more

Similar Papers

Cite this paper

@article{fanelli2024dream,
  title  = {I Dream My Painting: Connecting MLLMs and Diffusion Models via Prompt Generation for Text-Guided Multi-Mask Inpainting},
  author = {Nicola Fanelli and Gennaro Vessio and Giovanna Castellano},
  year   = {2024},
  eprint = {2411.19050},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.19050v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.19050.svg)](https://codeofpaper.com/paper/2411.19050)

Discussion