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

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

23 Nov 2022CVPR 2023 1arXiv:2211.13227archive 2025-07-28

Binxin Yang, Shuyang Gu, Bo Zhang, Ting Zhang, Xuejin Chen, Xiaoyan Sun, Dong Chen, Fang Wen

Language-guided image editing has achieved great success recently. In this paper, for the first time, we investigate exemplar-guided image editing for more precise control. We achieve this goal by leveraging self-supervised training to disentangle and re-organize the source image and the exemplar. However, the naive approach will cause obvious fusing artifacts. We carefully analyze it and propose an information bottleneck and strong augmentations to avoid the trivial solution of directly copying and pasting the exemplar image. Meanwhile, to ensure the controllability of the editing process, we design an arbitrary shape mask for the exemplar image and leverage the classifier-free guidance to increase the similarity to the exemplar image. The whole framework involves a single forward of the diffusion model without any iterative optimization. We demonstrate that our method achieves an impressive performance and enables controllable editing on in-the-wild images with high fidelity.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2211.13227")

Code

Syntology Ran 7 of 20 code samples harvested from 1 repository linked to this paper; 13 have no recorded run. Of those that ran: 2 ran · violated contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: community (archive-listed): 17 samples from 1 repository, 4 ran; 3 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Fantasy-Studio/Paint-by-Example officialmentioned in papermentioned on GitHubpytorchNOASSERTION report
LonglongaaaGo/EXE-GAN mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

20 samples harvested; 7 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · violated contract
3ran · our draft was wrong
1ran · fixture could not drive it
1ran
13unverified

Licence: 3 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from LonglongaaaGo/EXE-GAN. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

d_logistic_loss LonglongaaaGo/EXE-GAN/exemplar_style_mixing.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 3651db4e5ae8d189 · report
data_sampler LonglongaaaGo/EXE-GAN/exemplar_style_mixing.py community (archive-listed) ran · our draft was wrong MIT (permissive) · dbb756dcd778f52f · report
make_kernel LonglongaaaGo/EXE-GAN/models/exe_gan_nets.py community (archive-listed) ran · violated contract MIT (permissive) · 6f65e378a4313f87 · report
reduce_sum LonglongaaaGo/EXE-GAN/distributed.py community (archive-listed) ran fingerprinted MIT (permissive) · 3f0a1105ef251d78 · report
all_gather LonglongaaaGo/EXE-GAN/distributed.py community (archive-listed) unverified MIT (permissive) · ed03ba54397adbe4 · report
color_2mask LonglongaaaGo/EXE-GAN/img_load_util.py community (archive-listed) unverified MIT (permissive) · 2d472433c663434f · report
d_logistic_loss LonglongaaaGo/EXE-GAN/guided_recovery.py community (archive-listed) unverified MIT (permissive) · 2a0761df010571b2 · report
dilate_demo LonglongaaaGo/EXE-GAN/dataset.py community (archive-listed) unverified MIT (permissive) · a381b6902170861c · report
embedding_loss LonglongaaaGo/EXE-GAN/Loss/psp_embedding.py community (archive-listed) unverified MIT (permissive) · b16e4b2d76125214 · report
erode_demo LonglongaaaGo/EXE-GAN/dataset.py community (archive-listed) unverified MIT (permissive) · 17bd3ef96668d497 · report
get_img_lists LonglongaaaGo/EXE-GAN/img_load_util.py community (archive-listed) unverified MIT (permissive) · 5d24d1772337c22c · report
load_img2tensor LonglongaaaGo/EXE-GAN/img_load_util.py community (archive-listed) unverified MIT (permissive) · 6520319a65c8cf38 · report
make_noise LonglongaaaGo/EXE-GAN/models/exe_gan_nets.py community (archive-listed) unverified MIT (permissive) · 6503cdd2ec3fa92b · report
mixing_noise LonglongaaaGo/EXE-GAN/models/exe_gan_nets.py community (archive-listed) unverified MIT (permissive) · 9df6285dc883665c · report
reduce_loss_dict LonglongaaaGo/EXE-GAN/distributed.py community (archive-listed) unverified MIT (permissive) · 5144ad456049f8ce · report
score_2afc_dataset LonglongaaaGo/EXE-GAN/lpips_local/dist_model.py community (archive-listed) unverified MIT (permissive) · 514dd3c0eee3691c · report
set_device LonglongaaaGo/EXE-GAN/fid_eval.py community (archive-listed) unverified MIT (permissive) · 1fdf42050ecd38e7 · report
calculate_frechet_distance identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 4cee7c1861294d59 · report
chunk identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 8241c0562bc710fd · report
numpy_to_pil identical code first harvested elsewhere ran · violated contract licence of this copy not recorded · 1e63d588563eb90a · report

Tasks

Image GenerationImage Manipulation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections