# Fantasy-Studio/Paint-by-Example

Paint by Example: Exemplar-based Image Editing with Diffusion Models

Repository: https://github.com/Fantasy-Studio/Paint-by-Example
Canonical: https://ross.abutalabs.com/products/paint-by-example
Homepage: https://arxiv.org/abs/2211.13227
Language: Python
License: NOASSERTION
License Family: other
Topics: computer-vision, deep-learning, diffusion-models, image-editing, image-generation, image-manipulation, pytorch, stable-diffusion, paint-by-example
Last push: 2023-11-28T02:32:20+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 0, release rhythm 35, longevity 98
- inputs: {"age_days": 1379, "days_push": 1010, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1252, forks 113 (observed 2026-08-28T04:04:08.397376+00:00)

## What it is
Paint by Example is a PyTorch implementation of exemplar-based image editing with diffusion models, letting users fill masked regions of an image using a reference exemplar image instead of text prompts. It accompanies the arXiv paper 2211.13227 and provides pretrained checkpoints, a test benchmark, and a Hugging Face demo.

## Use cases
- fill a masked region of a photo using a reference object image
- edit images with exemplar-guided diffusion instead of text prompts
- run the Paint by Example pretrained model on my own images
- reproduce the paper's quantitative benchmark results
- try exemplar-based inpainting in a Hugging Face demo

## When to choose
- you need reference-image-guided inpainting rather than text-guided editing
- you want to build on or study the Paint by Example diffusion approach
- you need a single-forward-pass editing model without iterative optimization

## When to avoid
- you need text-prompt-based image editing only
- you require a production-ready product with active maintenance and a clear license
- you lack a GPU or cannot run PyTorch diffusion models

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, machine-learning, deep-learning
- domain: computer-vision, image-processing, deep-learning
- platform: python
- tags: diffusion-models, stable-diffusion, image-editing, exemplar-based, inpainting, pytorch, research-code, gpu

## Member repositories
- Fantasy-Studio/Paint-by-Example (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:08.397376+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:07:31.552892+00:00, confidence not recorded.
  - readme: https://github.com/Fantasy-Studio/Paint-by-Example (fetched 2026-08-28T04:04:08.397376+00:00, sha a781420389e5)
  - homepage: https://arxiv.org/abs/2211.13227 (fetched 2026-08-29T12:18:26.000437+00:00, sha c7bcbfbdfc73)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T12:18:26.009474+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T12:18:26.012714+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T12:18:26.014550+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T12:18:26.011100+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
