Papers › InstructPix2Pix: Learning to Follow Image Editing Instructions

InstructPix2Pix: Learning to Follow Image Editing Instructions

17 Nov 2022CVPR 2023 1arXiv:2211.09800archive 2025-07-28

Tim Brooks, Aleksander Holynski, Alexei A. Efros

We propose a method for editing images from human instructions: given an input image and a written instruction that tells the model what to do, our model follows these instructions to edit the image. To obtain training data for this problem, we combine the knowledge of two large pretrained models -- a language model (GPT-3) and a text-to-image model (Stable Diffusion) -- to generate a large dataset of image editing examples. Our conditional diffusion model, InstructPix2Pix, is trained on our generated data, and generalizes to real images and user-written instructions at inference time. Since it performs edits in the forward pass and does not require per example fine-tuning or inversion, our model edits images quickly, in a matter of seconds. We show compelling editing results for a diverse collection of input images and written instructions.

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.09800")

Code

Syntology Ran 15 of 20 code samples harvested from 4 repositories linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · violated contract; 5 ran · our draft was wrong; 5 ran with no contract checked.

By repository: community (archive-listed): 20 samples from 4 repositories, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

timothybrooks/instruct-pix2pix officialmentioned on GitHubpytorchNOASSERTION report
lsl001006/zone mentioned on GitHubpytorch report
mahdip72/InstructPix2Pix mentioned on GitHubpytorch report
mv-lab/InstructIR mentioned on GitHubpytorch 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; 15 ran; 2 honoured the contract we drafted; 5 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 · honoured contract
3ran · violated contract
5ran · our draft was wrong
5ran
5unverified

Licence: 0 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 4 repositories linked to this paper, official or community; each sample names its own and says which. “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.

InstructIR mv-lab/InstructIR/models/instructir.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · da8184593ecc419a · report
NAFBlock mv-lab/InstructIR/models/instructir.py community (archive-listed) ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 359c5485e870e3e6 · report
adapt_unet_for_pix2pix mahdip72/InstructPix2Pix/instruct_pix2pix/model.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 569fbf037c75f18b · report
always xuduo35/InstructPix2Pix/ldm/modules/x_transformer.py community (archive-listed) ran · our draft was wrong MIT (permissive) · fe5dd5258046898c · report
chunk xuduo35/InstructPix2Pix/stable_txt2img.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 8241c0562bc710fd · report
default xuduo35/InstructPix2Pix/ldm/modules/attention.py community (archive-listed) ran · violated contract MIT (permissive) · 424012cb37b31172 · report
disabled_train xuduo35/InstructPix2Pix/ldm/models/diffusion/classifier.py community (archive-listed) ran · violated contract MIT (permissive) · 4cb732f513d69dfd · report
exists xuduo35/InstructPix2Pix/ldm/modules/attention.py community (archive-listed) ran · violated contract MIT (permissive) · aa5486a3650902d8 · report
get_bert_token_for_string xuduo35/InstructPix2Pix/ldm/modules/embedding_manager.py community (archive-listed) ran · honoured contract MIT (permissive) · d5726f9e3a5684c3 · report
get_clip_token_for_string xuduo35/InstructPix2Pix/ldm/modules/embedding_manager.py community (archive-listed) ran · honoured contract MIT (permissive) · 41c6eb3a0aa3eb46 · report
get_embedding_for_clip_token xuduo35/InstructPix2Pix/ldm/modules/embedding_manager.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 71c2df28a1008d03 · report
isimage xuduo35/InstructPix2Pix/ldm/util.py community (archive-listed) ran MIT (permissive) · b1368330cf0f5642 · report
ismap xuduo35/InstructPix2Pix/ldm/util.py community (archive-listed) ran MIT (permissive) · d72762b700feee6f · report
log_txt_as_img xuduo35/InstructPix2Pix/ldm/util.py community (archive-listed) ran MIT (permissive) · f41710299c49d36d · report
uniq xuduo35/InstructPix2Pix/ldm/modules/attention.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 9a299fe5ae09e407 · report
ICB mv-lab/InstructIR/models/instructir.py community (archive-listed) unverified MIT (permissive) · 4a0143b046f97246 · report
center_crop xuduo35/InstructPix2Pix/stable_txt2img.py community (archive-listed) unverified MIT (permissive) · 81aae1af1d3e0807 · report
prune_checkpoint xuduo35/InstructPix2Pix/ldm/pruner.py community (archive-listed) unverified MIT (permissive) · 9aee358ca7c31dbc · report
register_attention_control lsl001006/zone/null_text_w_ptp.py community (archive-listed) unverified Apache-2.0 (permissive) · 48d7b99aa07d02fe · report
text2image_instructpix2pix lsl001006/zone/null_text_w_ptp.py community (archive-listed) unverified Apache-2.0 (permissive) · 70183cfe0ed40ffb · report

Tasks

Image EditingLanguage ModelingLanguage ModellingText to Image GenerationText-based Image Editing

Datasets

Introduced by this paper, per the archive.

InstructPix2Pix Image Editing Dataset

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Editing ImgEdit-Data Instruct-Pix2Pix Action 1.46 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Add 2.45 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Adjust 1.83 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Background 1.44 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Extract 1.44 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Hybrid 1.2 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Overall 1.88 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Remove 1.50 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Replace 2.01 #8 of 9 Archive leaderboard report
Image Editing ImgEdit-Data Instruct-Pix2Pix Style 3.55 #8 of 9 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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