Text to image
On the grey first-pass curve, we decode step 34's one-step clean latent estimate for a coding agent to inspect and edit in pixel space. Blue arrows follow the edit and re-encode the masked region to step 30, where the frozen flow model resumes denoising along the blue curve.
Image editing
Without fine-tuning an image editor, the coding agent edits the source image in pixel space with no first-pass curve. Blue arrows follow the edit to encode and noise the masked region to step 17, and a frozen flow model denoises along the blue curve to harmonize realism.
One sampler
v = (1 − λ) vtar100% SDEdit + λ (vtar − vsrc + vlin)0% FlowEdit
vtar = vθ(x, target prompt)vsrc = vθ(xsrc, source prompt)vlin = ε − zsrc
The larger λ, the closer the result stays to the photo, and the less room the edit has to change it.
At λ = 0, SDEdit denoises from the target prompt alone to redraw shapes and materials; at λ = 1, FlowEdit anchors the velocity to the source image to preserve fine detail. The coding agent chooses any λ between 0 and 1 per edit to control edit strength.
What the code changes
Benchmarks
Bold, the best. Underlined, the second.
Text to image
Image editing
Ablations
Text to image
GenEval accuracy, %, with SD3.5-Medium, on 2,212 images
Image editing
GEdit-Bench score, 0 to 10, with FLUX.1-dev, on 606 samples
Saved sessions
Prompt
Code as Pixels
Pick an edit on the tree to see its code
The coding agent or a human user can intervene at any denoising timestep with pixel-space code edits to fork a new trajectory branch. Click any branch to play its denoising steps, compare before and after, or read the Python code.