OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Paint By Example

Paint By Example is a research project for exemplar-based image editing with diffusion models. It uses a source image, a mask for the area to edit, and a reference image to guide the result. The repository includes Python code for inference, training and benchmark evaluation, and links to a Hugging Face demo.

Independent OpenViST project profile, based on linked sources.

Paint By Example — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when the desired edit should take visual guidance from an exemplar, or when studying and reproducing a research workflow for exemplar-based diffusion editing.

Who it is for

  • People exploring image edits guided by a visual reference rather than a text instruction alone.
  • Researchers and developers interested in diffusion-based image editing implementations.
  • Users who want to try the linked Hugging Face demo or run the repository’s inference code locally.

Documented uses

  • Guide a masked edit of a source image using a reference image or patch.
  • Run inference on example inputs with a pretrained checkpoint.
  • Prepare Open-Images data and train a model using the repository workflow.
  • Generate results for the project’s COCO exemplar-based image editing benchmark.
Before you choose

Requirements & limits

The repository links to a Hugging Face demo. Local inference uses the repository code, a Conda environment and a downloaded pretrained checkpoint.

  • Inference requires three image inputs: source, mask and reference.
  • The repository documents a pretrained checkpoint and a separate Stable Diffusion v1-4 initialization for training.
  • Training involves downloading Open-Images images and bounding-box annotations and preparing annotation files.
  • The README describes the editing method as using a single diffusion-model forward pass without iterative optimization.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run local inference on an example image

Use the repository’s inference script with a source image, edit mask, reference image and pretrained checkpoint.

Before you start

  • A suitable Conda installation and the repository environment.yaml file.
  • The pretrained checkpoint saved as checkpoints/model.ckpt.
  • A source image, mask image and reference image; the README example uses files under examples/.

Steps

  1. Create the environment with conda env create -f environment.yaml, then activate it with conda activate Paint-by-Example.

  2. Download the pretrained checkpoint and save it in the checkpoints directory as model.ckpt.

  3. Run scripts/inference.py with the documented configuration, checkpoint, source-image, mask and reference-image arguments; choose an output directory, seed and scale.

Expected outcome

The inference script samples an edited image and writes results to the selected output directory.

Guide limitations

  • The README provides an example command but this guide does not verify execution or compatibility.
  • The source, mask and reference paths must point to available image files; the documented command uses example assets.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
Fantasy-Studio/Paint-by-Example · Official homepage title · retained in its source language