betaFeedback

WorksComputer Science

EditGRN: Inversion-Free Image Editing by Source-Target Generative Synchronization

Abstract

Text-guided image editing faces a persistent trade-off between preserving source content and realizing coherent target semantics. We explore this challenge through training- and inversion-free image editing based on discrete generative models. Existing inversion-free discrete editors primarily rely on post-hoc probability correction, creating a disconnect between local token-level adjustments and globally coherent semantic generation. To bridge this gap, we introduce EditGRN, a training- and inversion-free framework with trajectory-wide source-target generative synchronization in discrete space. EditGRN adopts a dual-branch design—the source branch constructs source references and the target branch generates the target image-enabling trajectory-wide synchronization between the two. Exploiting GRN's ability to recover clean tokens from arbitrary binary corruptions, the source branch directly constructs corrupted source states at each refinement step to extract useful editing features, without recovering a specific source-generation trajectory. The target branch synchronizes with the source branch through the same corruption schedule, fusing the corresponding source context with editable representations intra-model. By synchronizing source context with target generation along the entire trajectory, our approach faithfully preserves the background while producing high-quality edits that blend seamlessly with the surrounding scene through intra-model fusion. PIE-Bench show state-of-the-art performance on background preservation and text alignment across diverse editing tasks against continuous and discrete baselines.

Introduction

Text-guided image editing requires balancing target realization against background preservation. Training-based editors require costly paired editing data [1, 21, 6, 13], motivating training-free editing on pretrained generators [9, 2]. Discrete models offer a distinct advantage: each token is either retained as source ground truth or independently resampled, providing a directly manipulable interface free from diffusion’s entangled per-dimension Gaussian noise.

Image inversion traces generative dynamics backward from a source image to recover a noise trajectory that initializes target-conditioned generation [10, 12, 17]. However, recent work shows that explicit inversion is not always essential for effective editing [20, 11, 18, 5], shifting focus to incorporating source information directly into editing without inversion.

In discrete generation, inversion-free editors such as AREdit [18] and MLN [5] regulate tokens through post-hoc probability correction. Such output-level adjustment leaves a gap between local token nudges and coherent structure generation. As shown in Figure 1, it either fails to realize the target edit or entangles source and target features (e.g., the flowers and red backpack). This motivates injecting source context into the model’s internal computation rather than correcting probabilities after prediction. Internal source-feature extraction has proven effective in continuous flow-based editors such as KV-Edit [23], but obtaining these features relies on a specific and sequential source inversion trajectory. Direct Gaussian noising avoids inversion, yet the resulting states need not lie on a coherent source trajectory and therefore may not provide effective editing features. This raises a central question: can a discrete generative model provide useful internal source features without recovering a specific generation trajectory.

Figure 1. Across object addition, change, and removal, our method, EditGRN, produces accurate, contextually coherent edits while preserving unedited content, whereas the state-of-the-art training- and inversion-free discrete method MLN El-Ghoussani et al. [5] exhibits incomplete modifications and unintended appearance changes in these examples. Red masks indicate editing regions.

We propose EditGRN, a training- and inversion-free discrete framework built on trajectory-wide source-target generative synchronization. We build on Generative Refinement Networks (GRN) [7], a discrete generative model trained to recover clean tokens from arbitrary binary-corrupted states rather than trajectory-consistent inputs. Leveraging this property, the source branch directly applies binary corruption to the clean source tokens at each refinement step, avoiding the recovery of a specific generation trajectory and the accumulation of sequential prediction errors. The source and edit branches share the same random corruption schedule, establishing source–target synchronization between the extracted source features and the corresponding edit representations at each refinement step, thereby enabling effective target editing. Inside the model, this synchronized source context fuses with editable-region representations, simultaneously preserving background fidelity, generating high-quality target content, and yielding smooth edited–unedited integration. Since the edit branch reasons only over editable tokens, its attention cost scales with the edit region rather than the full image. Smaller edits therefore run faster, and the extracted source features can be reused across multiple edits of the same image. On PIE-Bench, EditGRN achieves state-of-the-art background preservation and text alignment. Our contributions are:

  • We present EditGRN, a training- and inversion-free discrete editing framework built on trajectory-wide source–target synchronization: rather than correcting token probabilities post-hoc, source context is aligned with editing representations throughout refinement and fused intra-model.

  • We observe and exploit GRN’s robustness to arbitrary binary corruption, while sharing the same random corruption schedule between the source and edit branches to obtain synchronized source features that effectively guide target editing without recovering a specific, coherent source-generation trajectory.

  • Extensive experiments on PIE-Bench demonstrate that EditGRN achieves state-of-the-art background preservation and text alignment, with computation that adaptively scales with edit-region size.

Related Work

Training-based and training-free image editing. Training-based editors [1, 21, 6, 13] learn image-conditioned generation from costly paired or synthetic editing data. Alternatively, pretrained generators can be adapted for editing without task-specific training. Some methods optimize image-specific conditioning embeddings to improve reconstruction [12], while others operate directly at inference through attention control, feature sharing, or trajectory manipulation [9, 2, 11, 18]. Our method requires neither task-specific training nor per-image optimization, using only forward inference with pretrained models.

Inversion-based and inversion-free image editing. Inversion-based methods recover a source noise or latent trajectory before reusing its attention or features during target generation [9, 10, 17, 23]. Inversion-free alternatives show that source-consistent editing can instead be constructed directly during inference: InfEdit couples source and target diffusion processes [20], while FlowEdit defines a direct source-to-target flow [11]. Our method directly re-corrupts encoded source tokens to each GRN refinement level, avoiding recovery of a source trajectory or a continuous noise endpoint.

Discrete generative models for image editing. Discrete editors adapt different generation paradigms: EditAR learns next-token editing [13], whereas DICE, VARIN, and EditInfinity recover source representations through discrete inversion or per-image optimization [8, 4, 16]. Inversion-free methods instead exploit source–target probability differences, as in AREdit [18], or bias target logits toward source tokens, as in Masked Logit Nudging [5]. Our approach centers on constructing source reference features without inversion. Leveraging GRN’s training over random binary-token corruption [7], we directly corrupt the encoded source at each refinement level, rather than reconstructing its original generation history.

Preliminaries: Generative Refinement Networks

Visual Tokenizer. GRN employs a visual tokenizer composed of an encoder E\mathcal{E}, Hierarchical Binary Quantization (HBQ), and a decoder D\mathcal{D}. Given an normalized encoder feature F∈(−1,1)F \in(-1,1), HBQ performs MM rounds hierarchical binary quantization:

ci=∑j=1i−1δ(qj)2j,qi={0,F≤ci,1,F>ci,(1)c_i=\sum_{j=1}^{i-1}\frac{\delta(q_j)}{2^j}, \qquad q_i=\begin{cases}0, & F\leq c_i,\\1, & F>c_i,\end{cases} \tag*{(1)}

where δ(0)=−1\delta(0)=-1 and δ(1)=1\delta(1)=1. The quantized feature is reconstructed as F^=∑i=1Mδ(qi)2−i\hat{F}=\sum_{i=1}^{M}\delta(q_i)2^{-i}. Concatenating the binary decisions across feature channels gives the token map

z=QHBQ(E(x))∈{0,1}D×H×W,(2)z=Q_{\mathrm{HBQ}}(\mathcal{E}(x))\in\{0,1\}^{D\times H\times W}, \tag*{(2)}

which can be mapped back to image space by D\mathcal{D}.

Generative Network. During training, GRN learns to predict the ground-truth token map from a randomly corrupted input:

z~=m⊙z+(1−m)⊙zrand,(3)\tilde{z}=m\odot z+(1-m)\odot z_{\mathrm{rand}}, \tag*{(3)}

where m∈{0,1}D×H×Wm\in\{0,1\}^{D\times H\times W} selects ground-truth zz or uniformly sampled random bits zrandz_{\mathrm{rand}} at each entry. Given z~\tilde{z}, text condition cc, and retention ratio p=∥m∥1DHWp=\frac{\lVert m\rVert_1}{DHW}, the Transformer predicts token logits ℓ=fθ(z~,c,p)\ell=f_{\theta}(\tilde{z},c,p), from which a token map is sampled. The model is optimized with the cross-entropy

LGRN=−1DHW∑k,dlog⁡pθ(zk,d∣z~,c,p).(4)\mathcal{L}_{\mathrm{GRN}}=-\frac{1}{DHW}\sum_{k,d}\log p_{\theta}(z_{k,d}\mid\tilde{z},c,p). \tag*{(4)}

By training across randomly sampled retention ratio pp, retention maps mm, and replacement random binary tokens zrandz_{\mathrm{rand}}, GRN learns to recover tokens directly from arbitrary corrupted states, not just from trajectory-consistent inputs. At inference, GRN progressively refines a fully random binary token map by increasing its retention ratio from 0 to 1.

Method

Dual-branch Synchronized Editing Framework

Given a source image xsx_s, source and target prompts csc_s and cec_e, and a user-provided mask RR, our goal is to modify tokens within RR while preserving those in the protected region Rˉ=1−R\bar{R}=1-R. As shown in Figure 2, EditGRN adopts a dual-branch design: the source branch constructs source references, and the target branch generates the target image. The two branches are synchronized under the same GRN refinement schedule, including retention maps {mt}t=tsT\{m_t\}_{t=t_s}^{T} and random binary tokens zrandz_{\mathrm{rand}}, so that corruption intensity is aligned at every step. At each step, the source branch processes a corrupted source state with full self-attention and extracts source keys and values from the visual tokens. Inside every Transformer layer, the target branch replaces its protected region keys and values with these source keys and values, so target queries attend to source-provided context. Predictions are written back only inside RR, while protected tokens are restored from source tokens. Algorithm 1 summarizes the procedure.

Overview of EditGRN

Figure 2. Overview of EditGRN. The source branch (top) corrupts clean source tokens at each refinement stage and extracts unedited-region KV; the target branch (bottom) shares the same corruption schedule and replaces its unedited-region KV with the source ones inside every Transformer layer, generating only within the edit region while protected tokens remain anchored to the source.

Source Reference Construction

Trajectory-decoupled source representations. Our key observation is that GRN recovers clean tokens from arbitrary binary corruptions without requiring the corrupted states to form a continuous trajectory. We exploit this property by constructing each source state directly from the clean source tokens at its corresponding corruption level:

zst=mt⊙zs+(1−mt)⊙zrand,pst=∥mt∥1DHW,t=ts,…,T.(5)z_s^t = m_t \odot z_s + (1-m_t) \odot z_{\mathrm{rand}}, \qquad p_s^t = \frac{\lVert m_t \rVert_1}{DHW}, \qquad t=t_s,\ldots,T. \tag*{(5)}

Each zstz_s^t is constructed directly from zsz_s, rather than propagated from zst−1z_s^{t-1}. The retention map mtm_t only needs to match the scheduled ratio, without requiring a transition from the preceding retention map, while zrandz_{\mathrm{rand}} is sampled once and shared across steps. Thus, source reference construction does not require recovering a specific source-generation trajectory and does not accumulate source prediction errors.

In contrast, in continuous trajectory-based source feature extraction, source states are coupled through the learned velocity field: dxstdt=vθ(xst,t,cs),xst=xs0+∫0tvθ(xsτ,τ,cs) dτ\frac{d x_s^t}{dt}=v_\theta(x_s^t,t,c_s), x_s^t=x_s^0+\int_0^t v_\theta(x_s^\tau,\tau,c_s)\,d\tau. Although direct Gaussian noising can construct x~st=(1−t)xs0+tϵ\tilde{x}_s^t=(1-t)x_s^0+t\epsilon, the resulting state is not guaranteed to lie on the same coherent source generation trajectory dx~stdt≠vθ(x~st,t,cs)\frac{d\tilde{x}_s^t}{dt}\ne v_\theta(\tilde{x}_s^t,t,c_s). Therefore, direct state construction alone does not ensure that the extracted source features align with the corresponding target generation state or effectively guide editing.

Source context extraction. We next extract source context from these trajectory-decoupled representations for use in the target branch. Motivated by the successful reuse of background KV for guidance in flow-based editing ([23]), source keys modulate target-query attention over source positions, and source values supply source context for target generation. Specifically, GRN processes the joint sequence [zst;cs;pst][z_s^t;c_s;p_s^t] with full self-attention at each step tt, projecting hidden states into queries, keys, and values. We cache the resulting source keys and values {Kst,Vst}t=tsT\{K_s^t,V_s^t\}_{t=t_s}^{T} corresponding to the visual tokens for all steps. Because GRN is trained to recover clean tokens from binary-corrupted inputs, the features extracted from each corrupted source state contain the information needed to reconstruct the source. Sharing the same random corruption schedule synchronizes these source features with the corresponding target representations at every refinement step, allowing them to effectively guide target-region generation through intra-model fusion rather than post-hoc probability correction.

Algorithm 1 EditGRN with trajectory-wide source-target generative synchronization
Require: Source image $x_s$; source prompt $c_s$, target prompt $c_e$; user-provided mask $R$; GRN $f_\theta$; retention maps $\{m_t\}_{t=t_s}^{T_s}$; random binary tokens $z_{\mathrm{rand}}$
$t=t_s$
1: $z_s \leftarrow Q_{\mathrm{HBQ}}(\mathcal{E}(x_s)) \in \{0,1\}^{D \times H \times W}$
2: $z_s^{t_s} \leftarrow m_{t_s} \odot z_s + (1-m_{t_s}) \odot z_{\mathrm{rand}}$
3: $\bar{R} \leftarrow 1-R$
// Source branch
4: for $t=t_s,\ldots,T$ do
5: $p_s^t \leftarrow \frac{\sum_{i,d}m_{t,i,d}}{DHW}$
6: $\{K_s^t,V_s^t\} \leftarrow f_\theta(z_s^t,c_s,p_s^t)$
7: if $t<T$ then $z_s^{t+1} \leftarrow m_{t+1}\odot z_s^t+(1-m_{t+1})\odot z_{\mathrm{rand}}$
8: end for
// Target branch
9: $z_e^{t_s}[R]\leftarrow z_s^{t_s}[R],\ z_e^{t_s}[\bar{R}]\leftarrow z_s[\bar{R}]$
10: for $t=t_s,\ldots,T$ do
11: $p_e^t \leftarrow \frac{\sum_{i,d}R_{i,d}m_{t,i,d}}{\sum_{i,d}R_{i,d}}$
12: $\hat{z}_e^t[R]\leftarrow f_\theta(z_e^t,c_e,p_e^t;\{K_s^t[\bar{R}],V_s^t[\bar{R}]\})$
13: if $t<T$ then $z_e^{t+1}[R]\leftarrow m_{t+1}[R]\odot\hat{z}_e^t[R]+(1-m_{t+1}[R])\odot z_{\mathrm{rand}}[R],\ z_e^{t+1}[\bar{R}]\leftarrow z_s[\bar{R}]$
14: end for
15: $\hat{z}_e^T[\bar{R}]\leftarrow z_s[\bar{R}]$
16: return $\hat{x}_e=D(\hat{z}_e^T)$

Trajectory-Wide Source–Target Generative Synchronization

Trajectory-Wide Synchronization Corruption Schedule. The target branch starts at the same tst_s as the source branch and shares the same retention map mtm_t and random binary tokens zrandz_{\mathrm{rand}}. To initialize its state, we take the clean source tokens zsz_s in the protected region and apply the same corrupted source state zstsz_s^{t_s} inside the edit region:

zets[R]=zsts[R],zets[Rˉ]=zs[Rˉ],pet=∑i,dRi,dmt,i,d∑i,dRi,d≈pst,(6)z_e^{t_s}[R]=z_s^{t_s}[R],\quad z_e^{t_s}[\bar{R}]=z_s[\bar{R}],\quad p_e^t=\frac{\sum_{i,d}R_{i,d}m_{t,i,d}}{\sum_{i,d}R_{i,d}}\approx p_s^t, \tag*{(6)}

where Rˉ=1−R\bar{R}=1-R. Because mtm_t selects bits uniformly across the token map, pet≈pstp_e^t\approx p_s^t, so the edit region experiences the same corruption intensity as the source branch at every step. This shared corruption schedule is the trajectory-wide synchronization: source context is always extracted at the corruption level matching the current target state, rather than from a fixed clean reference.

Intra-Model Region Fusion. At each Transformer layer, we replace the target branch’s protected-region keys and values with the cached source ones at the same step: K~et=concat⁡[Ket[Rˉ],Kst[R]]\widetilde{K}_e^t=\operatorname{concat}[K_e^t[\bar{R}],K_s^t[R]], V~et=concat⁡[Vet[Rˉ],Vst[R]]\widetilde{V}_e^t=\operatorname{concat}[V_e^t[\bar{R}],V_s^t[R]], where [R][R] and [Rˉ][\bar{R}] index the edit region RR and protected region Rˉ\bar{R}, respectively. Target queries in RR then attend over this fused visual context together with cec_e and petp_e^t. After sampling the target proposal z^et[R]\hat{z}_e^t[R] (defined only inside RR), we corrupt the edit region for the next step while restoring protected tokens from the clean source:

zet+1[R]=mt+1[R]⊙z^et[R]+(1−mt+1[R])⊙zrand[R],zet+1[Rˉ]=zs[Rˉ].(7)z_e^{t+1}[R]=m_{t+1}[R]\odot\hat{z}_e^t[R]+(1-m_{t+1}[R])\odot z_{\mathrm{rand}}[R],\quad z_e^{t+1}[\bar{R}]=z_s[\bar{R}]. \tag*{(7)}

By fusing synchronized source context with target representations inside the model at every step, the edit region generates with consistent background guidance while protected tokens remain.

Area-Adaptive Editing. The source branch attends over all NIN_I tokens, while the target branch only computes visual queries for the NRN_R tokens inside RR, so the target-branch cost scales as O(NRNI)O(N_RN_I) rather than O(NI2)O(N_I^2); as shown in Figure 3 (a), target-branch time decreases linearly as the edit region shrinks. This advantage amplifies for repeated edits on the same image (Figure 4). Source features are extracted once and reused, whereas PnP re-inverts on every edit, KV-Edit pays a one-time but expensive inversion, and FlowEdit/MLN pay the full editing cost each time. EditGRN pays only once source once and then the target branch cost per edit, which results in a shallower cumulative-time slope (Figure 3 (b)). While MLN is the fastest, it can result in fragmented, poorly integrated edits in Figure 1. EditGRN retains efficiency without sacrificing quality.

Figure 3. (a) Target-branch time scales with edit-region area. (b) Cumulative time for repeated edits. Measured on an NVIDIA L20 GPU.

Figure 4. Multiple edits of the same image.

Experiments

Experimental Setup

Comparison Methods. We compare three groups: (1) editors requiring additional training or per-image optimization: InstructPix2Pix [1], MGIE [6], EditAR [13], Null-text + P2P [12, 9], and EditInfinity [16]; (2) training-free continuous editors: DDIM + P2P [9], PnP Inversion [10], InfEdit [20], RF-Edit [17], KV-Edit [23], and FlowEdit [11]; (3) training-free discrete editors: DICE [8], VARIN [4], AREdit [18], and MLN [5].

Benchmark. PIE-Bench [10], a widely adopted benchmark for text-guided image editing. It covers nine editing tasks-object replacement, addition, deletion, and changes to content, pose, color, material, background, and style. The images span natural and artificial scenes across four categories: animals, humans, indoor scenes, and outdoor scenes. Each example provides a source image with its corresponding source prompt, a target editing prompt, and an annotated editing mask.

Metrics. Following PIE-Bench, we report background PSNR, LPIPS, MSE, and SSIM, and CLIP similarity for the whole image and edited region [3, 22, 19, 15].

Implementation Details. We use the pretrained GRN text-to-image model 1^{1}. Experiments runs on a single NVIDIA L20 GPU. By default, we start at ts=14t_s = 14 with psts=0.10p_s^{t_s} = 0.10, retaining approximately 10% of source bits and requiring only T−ts=36T - t_s = 36 refinement steps out of T=50T = 50.

Comparison to State-of-the-Arts

Quantitative results. Under the PIE-Bench protocol, EditGRN (U, User-Provided Mask) achieves the best results across all background-preservation and text-alignment, as shown in Table 1. These improvements hold over methods requiring training and training-free continuous editors. Among inversion-free discrete editors, EditGRN also improves both aspects over AREdit and MLN, which employ prediction-probability guidance. Figure 5 further demonstrates strong performance across diverse editing tasks, rather than gains concentrated in a particular task category. Like KV-Edit and EditInfinity, EditGRN (U) uses user-provided mask, while achieving stronger performance than them under the same evaluation protocol.

MethodTypeTrainOptInvBackground PreservationText Alignment
PSNR↑\uparrowLPIPS×103↓\times10^{3}\downarrowMSE×104↓\times10^{4}\downarrowSSIM×102↑\times10^{2}\uparrowCLIPW↑_{\mathrm{W}}\uparrowCLIPE↑_{\mathrm{E}}\uparrow
Additional training or per-image optimization (Train=Y or Opt=Y)
InstructPix2PixCont.YNN16.69271.33392.2268.3923.4922.20
MGIECont.YNN21.20142.25295.1177.5224.2821.79
EditARDisc.YNN21.32117.15130.2775.1324.8721.87
Null-text + P2PCont.NYY27.0360.6735.8684.1124.7521.86
EditInfinityDisc.NYY27.9533.0824.2792.1226.4123.47
Training-free: continuous generators (Train=N and Opt=N)
DDIM + P2PCont.NNY17.87208.80219.8871.1425.0122.44
PnP InversionCont.NNY22.46106.0680.4579.6825.4122.62
InfEditCont.NNN28.5147.5832.0985.6625.0322.22
RF-EditCont.NNY24.83113.1552.4683.3825.5722.26
KV-EditCont.NNY35.879.924.69–22.91–
FlowEditCont.NNN21.96112.1994.9983.0825.2522.58
Training-free: discrete generators (Train=N and Opt=N)
DICEDisc.NNY27.2952.9043.7689.7923.7921.23
VARINDisc.NNY26.5454.0438.3385.3925.0521.49
AREditDisc.NNN24.1987.00–83.7025.4222.77
MLNDisc.NNN29.7036.5023.3086.8026.1522.72
EditGRN (U)Disc.NNN38.087.372.3298.8027.2924.65
EditGRN (A)Disc.NNN33.2216.8715.0797.5926.8023.83

Table 1. Quantitative results on PIE-Bench. Cont. and Disc. denote continuous (diffusion/flow) and discrete generative models, respectively. Train indicates additional task-specific training, Opt per-image optimization, and Inv explicit image inversion. For SGR-Edit, U and A denote user-provided and attention-derived masks, respectively. CLIPW_{\mathrm{W}} and CLIPE_{\mathrm{E}} measure alignment over the whole image and edited region.

Per-task results on PIE-Bench

Figure 5. Per-task results on PIE-Bench. EditGRN’s overall score (red dot) already exceeds other methods, and its per-task scores closely track this overall level across all categories.

Beyond user-provided masks, we also evaluate EditGRN (A, Attention-Derived Mask), which automatically localizes edits using attention maps. Following Prompt-to-Prompt [9] and MLN El-Ghoussani et al. [5], we identify edited words from source-target prompt differences and extract visual-to-text attention maps from the source branch at psts=0.8p_s^{t_s} = 0.8. We aggregate visual-to-text attention across subwords to localize edits, reusing the source branch forward pass. Otsu thresholding [14] then converts the attention maps into binary masks separating editable and background regions. For object addition, we instead use the target prompt in the source branch to extract attention maps for newly added words. EditGRN (A) still achieves competitive performance, suggesting limited reliance on precisely specified editing masks.

Qualitative Results. We compare across all PIE-Bench editing tasks in Figure 6. For space, we include four representative training-free editors: PnP Inversion, a classical inversion-based diffusion method; FlowEdit, a classical inversion-free flow method; KV-Edit, a flow-based inversion method that reuses source background KV; and MLN, a state-of-the-art inversion-free discrete editor. Across diverse tasks, including complex multi-object real-world scenes and text editing in Figure 1, EditGRN preserves unedited content while producing target-aligned modifications.

Qualitative results on PIE-Bench across all nine tasks

Figure 6. Qualitative results on PIE-Bench across all nine tasks. The red mask denotes the edited region RR, expected to follow the target prompt, while other regions retain the background.

Ablation Studies

Ablation studies are performed on the ‘random class’ of PIE-Bench, covering all types of editing and allowing an efficient and unbiased evaluation.

Ablation on Randomness Robustness. We run EditGRN with shared {mt}\{m_t\} and zrandz_{\mathrm{rand}} across the two branches but vary the random seeds across independent runs. The first line of Table 2 shows that metrics remain stable, and the two runs produce visually consistent edits (Figure 7, EditGRN (1–2)). This supports our trajectory-decoupled design. Since GRN is trained to recover clean tokens from arbitrary corrupted states, directly corrupting the clean source with different random seeds can still provide source KVs that consistently guide target editing. This suggests that useful editing features can be obtained without recovering source-specific generation randomness.

VariantPSNR↑LPIPS×10³ ↓MSE×10⁴ ↓SSIM×10² ↑CLIP_W ↑CLIP_E ↑
EditGRN39.00 ±1e-26.78 ±1e-42.06 ±3e-698.90 ±9e-526.39 ±0.0523.31 ±0.08
Unsynchronized {mt}\{m_t\}38.946.692.0498.9026.3423.18
Unsynchronized zrandz_{\mathrm{rand}}38.916.682.0498.9026.2023.33
Unsynchronized {mt},zrand\{m_t\}, z_{\mathrm{rand}}38.806.742.0198.9025.9623.02
Unsynchronized Corruption Level38.307.632.1598.8423.3119.17

Table 2. Quantitative results of ablating on Randomness Robustness and Synchronized Corruption Schedule.

Figure 7. Qualitative results of ablation studies.

Ablation on Synchronized Corruption Schedule. We progressively disrupt synchronization by independently sampling mtm_t, zrandz_{\mathrm{rand}}, or both across the source and target branches. Table 2 shows that changing either component alone has a limited effect, while changing both causes a larger degradation. Figure 7 further shows that independently sampling both mtm_t and zrandz_{\mathrm{rand}} may reduce the coherence between the edited hat and the surrounding fur.

For unsynchronized corruption level, we reuse KVs from the final, least-corrupted source state throughout refinement, fixing the source corruption level at its minimum while the target corruption level progressively decreases, leaving them mismatched at every step except the last. Consequently, even KVs extracted from the least-corrupted source state provide less effective guidance when their corruption level is mismatched with that of the target state, resulting in the largest degradation in Table 2. Figure 7 also shows that this mismatch substantially weakens the editing result.

Ablation on Protected Region Writeback and Source Context. To assess the role of Protected Region Writeback, we construct a variant in which the target branch predicts and refines the entire token map rather than only the edit region. In this variant, the protected tokens are neither initialized nor restored from the clean source tokens, while synchronized source KV guidance remains unchanged. The detailed procedure is provided in Algorithm 2. As shown by the ‘- Protected-region writeback’ variant in Table 3, background fidelity deteriorates.

VariantPSNR↑LPIPS×10³ ↓MSE×10⁴ ↓SSIM×10² ↑CLIP_W ↑CLIP_E ↑
EditGRN39.006.782.0698.9026.3923.31
− Protected-region writeback38.2911.642.6998.5626.3623.32
− Source KV38.636.562.0698.8924.7221.00
− Both15.30298.47434.3262.5726.6723.09

Table 3. Quantitative results of ablating on Protected Region Writeback and Source Context.

Source KV supplies contextual features but does not enforce equality between protected and source tokens. Token writeback explicitly enforces this constraint, improving background preservation without compromising text alignment.

To assess the role of Source Context, we remove source KV injection while retaining the remaining components. Since no source KV are required in this variant, the source branch is removed entirely. As shown by the ‘- Source KV’ variant in Table 3, both text-alignment metrics decrease substantially. Figure 7 further shows that source KV provides contextual cues from the source image, helping generate the edited object consistently with the surrounding content.

Finally, removing both Protected Region Writeback and Source KV Injection reduces the method to bare GRN generation initialized from the corrupted source state zstz_s^{t}. Without explicit background preservation or source context guidance, the model regenerates the full token map under the target prompt. GRN can still generate the target semantics, but cannot preserve and localize the edit to the source image without the two proposed components. Consequently, CLIP-W remains high, while background fidelity degrades substantially. This confirms that the gains do not come from the backbone alone.

Ablation on Trajectory-Decoupled Source in GRN and Flow. To assess whether trajectory-decoupled source-reference construction can provide useful KVs for editing without inversion, we contrast EditGRN’s direct binary corruption zst=mt⊙zs+(1−mt)⊙zrandz_s^{t} = m_t \odot z_s + (1 - m_t) \odot z_{\mathrm{rand}} with Zhu et al. [23] sequential RF inversion xst=xs0+∫0tvθ(xsτ,τ,cs) dτx_s^{t} = x_s^{0} + \int_{0}^{t} v_{\theta}(x_s^{\tau}, \tau, c_s)\,\mathrm{d}\tau and its inversion-free variant based on direct Gaussian noising xˉst=(1−t)xs0+tϵ\bar{x}_s^{t} = (1 - t)x_s^{0} + t\epsilon, ϵ∼N(0,I)\epsilon\sim\mathcal{N}(0, I). Here, xs0x_s^{0} denotes the clean source latent, and vθv_{\theta} is the RF velocity field conditioned on the source prompt csc_s. The two KV-Edit variants share the same flow-based target branch and background-KV injection, differing only in their source-reference construction.

As shown in Table 4, KV-Edit with inversion consistently outperforms its direct-noising variant. This indicates that KV-Edit extracts more effective source KVs from trajectory-consistent inversion states than from directly Gaussian-noised states. In contrast, EditGRN obtains strong performance without inversion, suggesting that GRN’s arbitrary binary-corruption training enables directly constructed source states to provide useful, synchronized editing features. Figure 8 provides consistent qualitative evidence. The direct-noising flow variant introduces artifacts when changing the birds into origami, whereas EditGRN successfully performs these edits.

VariantPSNR↑LPIPS×10³ ↓MSE×10⁴ ↓SSIM×10² ↑CLIP_W ↑CLIP_E ↑
EditGRN39.006.782.0698.9026.3923.31
KV-Edit w/ inversion35.818.695.3095.7425.0522.72
KV-Edit w/o inversion34.7110.736.2795.7224.5622.23

Table 4. Quantitative results of ablating on Trajectory-Decoupled Source in GRN and Flow.

Qualitative results of ablation studies on Trajectory-Decoupled Source in GRN and Flow

Figure 8. Qualitative results of ablation studies on Trajectory-Decoupled Source in GRN and Flow.

Ablation on Initial Retention Ratio. The initial retention ratio pstsp_s^{t_s} determines how much source information is retained in the edit region at the start of refinement: a larger pstsp_s^{t_s} preserves more source content but leaves less room for target realization. Table 5 and Figure 9 in the Appendix show that this trade-off manifests as improved background fidelity at the cost of weaker text alignment. We choose psts=0.10p_s^{t_s} = 0.10 with ts=14t_s = 14 to balance both objectives.

pstsp_s^{t_s}tst_sPSNR↑\uparrowLPIPS×103↓\times10^3 \downarrowMSE×104↓\times10^4 \downarrowSSIM×102↑\times10^2 \uparrowCLIPW↑_W \uparrowCLIPE↑_E \uparrow
0.00038.497.302.3098.8626.5923.67
0.101439.006.782.0698.9026.3923.31
0.202039.726.261.8098.9525.8322.88

Table 5. Ablation on initial retention ratio pstsp_s^{t_s} and start step tst_s.

Figure 9. Qualitative comparison of different initial retention ratio and start step.

Conclusion

We presented EditGRN, a training- and inversion-free framework for text-guided image editing in discrete space. Our key finding is that GRN’s ability to recover clean tokens from arbitrary binary corruptions enables the direct extraction of effective source features without recovering a specific source-generation trajectory. EditGRN exploits this property through synchronized source and target branches, using a shared corruption schedule to provide effective source guidance for target editing through intra-model fusion. Experiments demonstrate strong background preservation and text alignment, highlighting trajectory-decoupled source-feature extraction as a promising direction for coherent and efficient image editing.

AI Use Statement

In this work, we used generative AI tools to assist with understanding existing code, diagnosing and fixing implementation bugs, and improving the clarity and grammar of the manuscript. All AI-assisted code changes were manually reviewed and validated through experiments, and all AI-assisted writing was checked and revised by the authors. Generative AI was not used to fabricate data, results, citations, or scientific claims. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.

Appendix

Implementation Details for the Protected-Region Writeback Ablation

Our algorithm 1 initializes the protected region with source tokens: zsts[R]←zs[R],zsts[Rˉ]←zs[Rˉ]z_{s}^{t_s}[R] \leftarrow z_s[R], z_{s}^{t_s}[\bar{R}] \leftarrow z_s[\bar{R}]. Then, the model predicts only the edit region RR tokens zet[R]←fθ(zet,ce,pet;{Kst[Rˉ],Vst[Rˉ]})z_e^t[R] \leftarrow f_\theta(z_e^t, c_e, p_e^t; \{K_s^t[\bar{R}], V_s^t[\bar{R}]\}), after which the protected tokens are explicitly restored at every step: zet+1[R]←mt+1[R]⊙z^et[R]+(1−mt+1[R])⊙zrand[R],zet+1[Rˉ]←zs[Rˉ]z_e^{t+1}[R] \leftarrow m_{t+1}[R] \odot\hat{z}_e^t[R] + (1-m_{t+1}[R]) \odot z_{\mathrm{rand}}[R], z_e^{t+1}[\bar{R}] \leftarrow z_s[\bar{R}].

In the without Protected Region Writeback ablation, we (i) remove the initialization of the protected region with clean source tokens by replacing Algorithm 1 line 9 with zets←zstsz_e^{t_s} \leftarrow z_s^{t_s}; (ii) replace Algorithm 1 line 13 with z^et←fθ(zet,ce,pet;{Kst[R],Vst[R]})\hat{z}_e^t \leftarrow f_\theta(z_e^t,c_e,p_e^t; \{K_s^t[R],V_s^t[R]\}) so that the model predicts the entire token map; and (iii) replace Algorithm 1 line 14 with zet+1←mt+1⊙z^et+(1−mt+1)⊙zrandz_e^{t+1} \leftarrow m_{t+1} \odot\hat{z}_e^t + (1-m_{t+1}) \odot z_{\mathrm{rand}} thereby removing the stepwise restoration of the protected region.

Thus, the protected tokens are also predicted and corrupted rather than kept fixed. Source-KV injection alone cannot enforce exact token preservation, explaining the degraded background metrics.

Algorithm 2 EditGRN without protected-region writeback

Require: Source image xsx_s; source prompt csc_s, target prompt cec_e; user-provided mask RR; GRN fθf_\theta; retention maps {mt}t=tsT\{m_t\}_{t=t_s}^{T}; random binary tokens zrandz_{\mathrm{rand}}

  1. zs←QHBQ(E(xs))∈{0,1}D×H×Wz_s \leftarrow Q_{\mathrm{HBQ}}(E(x_s)) \in\{0,1\}^{D \times H \times W}

  2. zsts←mts⊙zs+(1−mts)⊙zrandz_s^{t_s} \leftarrow m_{t_s} \odot z_s + (1-m_{t_s}) \odot z_{\mathrm{rand}}

  3. Rˉ←1−R\bar{R} \leftarrow1-R

    Source branch

  1. for t=ts,…,Tt=t_s,\ldots,T do

  2. pst←∑i,dmt,i,dDHWp_s^t \leftarrow\frac{\sum_{i,d}m_{t,i,d}}{DHW}

  3. {Kst,Vst}←fθ(zst,cs,pst)\{K_s^t,V_s^t\} \leftarrow f_\theta(z_s^t,c_s,p_s^t)

  4. if t<Tt<T then zst+1←mt+1⊙zst+(1−mt+1)⊙zrandz_s^{t+1} \leftarrow m_{t+1} \odot z_s^t+(1-m_{t+1}) \odot z_{\mathrm{rand}}

  5. end for

    Target branch without protected-region writeback

  1. zets←zstsz_e^{t_s} \leftarrow z_s^{t_s}

  2. for t=ts,…,Tt=t_s,\ldots,T do

  3. pet←∑i,dmt,i,dDHWp_e^t \leftarrow\frac{\sum_{i,d}m_{t,i,d}}{DHW}

  4. z^et←fθ(zet,ce,pet;{Kst[Rˉ],Vst[Rˉ]})\hat{z}_e^t \leftarrow f_\theta(z_e^t,c_e,p_e^t; \{K_s^t[\bar{R}],V_s^t[\bar{R}]\})

  5. if t<Tt<T then zet+1←mt+1⊙z^et+(1−mt+1)⊙zrandz_e^{t+1} \leftarrow m_{t+1} \odot\hat{z}_e^t+(1-m_{t+1}) \odot z_{\mathrm{rand}}

  6. end for

  7. return x^e=D(z^eT)\hat{x}_e=D(\hat{z}_e^T)

Extended Analysis of pstsp_s^{t_s} and tst_s

The trade-off in Table 5 arises because pstsp_s^{t_s} directly determines the initial composition of the edit region: when pstsp_s^{t_s} is small, the edit region begins closer to pure random tokens, giving the model full freedom to generate target content but with weaker constraints on how the new object should integrate with the surrounding source scene. As pstsp_s^{t_s} grows, more source tokens are pinned in place, which anchors the edit region to the source layout but also injects source structure that may conflict with the target prompt. Figure 9 illustrates this: with psts=0.20p_s^{t_s}=0.20, the generated pizza bears source-like artifacts that should have been replaced, while with psts=0p_s^{t_s}=0 the pizza is cleaner but its shadow and lighting blend less naturally with the table setting. The start step tst_s acts on the same axis: starting refinement later (larger tst_s) means the source branch and target branch share fewer, less-corrupted steps, reducing synchronization benefit. Our default psts=0.10p_s^{t_s}=0.10 and ts=14t_s=14 gives the balance between target realization and scene integration.

Sources of Baseline Results

Except for the missing style-change subset of KV-Edit, which we reran, all results of comparison methods in Table 6 are taken from previously published papers. Since KV-Edit excludes stylechange tasks from its original PIE-Bench evaluation, We reran KV-Edit on the style-change subset of PIE-Bench using its official implementation https://github.com/Xilluill/KV-Edit, and combined these results with its originally reported scores. Therefore, the completed KV-Edit results cover the same PIE-Bench tasks as EditGRN and all comparison methods.

Comparison MethodsSource PaperVenue
InstructPix2Pix, MGIE, EditAREditAR: Unified Conditional Generation with Autoregressive ModelsCVPR 2025
Null-text + P2P, DDIM + P2P, PnP InversionPnP Inversion: Boosting Diffusion-based Editing with 3 Lines of CodeICLR 2024
EditInfinityEditInfinity: Image Editing with Binary-Quantized Generative ModelsNeurIPS 2025
InfEditInversion-Free Image Editing with Language-Guided Diffusion ModelsCVPR 2024
RF-Edit, FlowEditDNAEdit: Direct Noise Alignment for Text-Guided Rectified Flow EditingNeurIPS 2025 Spotlight
KV-Edit, excluding style changeKV-Edit: Training-Free Image Editing for Precise Background PreservationICCV 2025
KV-Edit, style-change subsetRerun using the official KV-Edit implementation—
DICE, VARINDiscrete Noise Inversion for Next-scale Autoregressive Text-based Image EditingECCV 2026
AREditTraining-Free Text-Guided Image Editing with Visual Autoregressive ModelICCV 2025
MLNPrompt-Guided Image Editing with Masked Logit Nudging in Visual Autoregressive ModelsCVPR 2026

Table 6. Sources of the baseline results reported in Table 1.

Additional Qualitative Results

Figure 10 presents more editing results across diverse tasks. EditGRN successfully realizes the target edits while faithfully preserving the unedited regions. As highlighted in the zoomed-in views, the boundaries between edited and preserved regions blend naturally, with consistent lighting, texture, and shadow-confirming the effectiveness of intra-model source context fusion.

Figure 10. Additional editing results. For each pair, the left is the source image and the right is EditGRN’s output. The zoomed-in views highlight smooth boundary blending between edited and preserved regions.

Limitations

This work focuses on static image editing; its extension to video and temporal consistency remain unexplored. Applying our method independently to each frame does not explicitly enforce cross-frame consistency and may introduce appearance variations or temporal flickering. Motion and occlusion further alter the editing region and its surrounding context, making frame-wise source guidance insufficient to guarantee temporally coherent edits. Future work should investigate temporally consistent source-feature construction and edit-region tracking, while assessing the computational and memory costs of caching features across frames.

References

  1. [1]Tim Brooks, Aleksander Holynski, and Alexei A. Efros. Instructpix2pix: Learning to follow image editing instructions. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18392–18402, 2023.arxiv.org/abs/2211.09800
  2. [2]Mingdeng Cao, Xintao Wang, Zhongang Qi, Ying Shan, Xiaohu Qie, and Yinqiang Zheng. Masactrl: Tuning-free mutual self-attention control for consistent image synthesis and editing. In IEEE/CVF International Conference on Computer Vision, 2023.arxiv.org/abs/2304.08465
  3. [3]Mathilde Caron, Hugo Touvron, Ishaan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In IEEE/CVF International Conference on Computer Vision, 2021.arxiv.org/abs/2104.14294
  4. [4]Quan Dao, Xiaoxiao He, Ligong Han, Ngan Hoai Nguyen, Amin Heyrani Nobari, Faez Ahmed, Han Zhang, Viet Anh Nguyen, and Dimitris N. Metaxas. Discrete noise inversion for next-scale autoregressive text-based image editing. arXiv preprint arXiv:2509.01984, 2025.
  5. [5]Amir El-Ghoussani, Marc Hölle, Gustavo Carneiro, and Vasileios Belagiannis. Prompt-guided image editing with masked logit nudging in visual autoregressive models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition Findings, pp. 4810–4820, 2026.
  6. [6]Tsu-Jui Fu, Wenze Hu, Xianzhi Du, William Yang Wang, Yinfei Yang, and Zhe Gan. Guiding instruction-based image editing via multimodal large language models. In International Conference on Learning Representations, 2024.arxiv.org/abs/2309.17102
  7. [7]Jian Han, Jinlai Liu, Jiahuan Wang, Bingyue Peng, and Zehuan Yuan. Generative refinement networks for visual synthesis. arXiv preprint arXiv:2604.13030, 2026.arxiv.org/abs/2604.13030
  8. [8]Xiaoxiao He, Quan Dao, Ligong Han, Song Wen, Minhao Bai, Di Liu, Han Zhang, Felix Juefei-Xu, Chaowei Tan, Bo Liu, Martin Renqiang Min, Kang Li, Faez Ahmed, Akash Srivastava, Hongdong Li, Junzhou Huang, and Dimitris N. Metaxas. Dice: Discrete inversion enabling controllable editing for masked generative models. In IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 762–772, 2026.DOI
  9. [9]Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Prompt-to-prompt image editing with cross-attention control. In International Conference on Learning Representations, 2023.arxiv.org/abs/2208.01626
  10. [10]Xuan Ju, Ailing Zeng, Yuxuan Bian, Shaoteng Liu, and Qiang Xu. Pnp inversion: Boosting diffusion-based editing with 3 lines of code. In International Conference on Learning Representations, 2024.arxiv.org/abs/2310.01506
  11. [11]Vladimir Kulikov, Matan Kleiner, Inbar Huberman-Spiegelglas, and Tomer Michaeli. Flowedit: Inversion-free text-based editing using pre-trained flow models. In IEEE/CVF International Conference on Computer Vision, pp. 19721–19730, 2025.arxiv.org/abs/2412.08629
  12. [12]Ron Mokady, Amir Hertz, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Null-text inversion for editing real images using guided diffusion models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023.arxiv.org/abs/2211.09794
  13. [13]Jiteng Mu, Nuno Vasconcelos, and Xiaolong Wang. Editar: Unified conditional generation with autoregressive models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7899–7909, 2025.arxiv.org/abs/2501.04699
  14. [14]Nobuyuki Otsu. A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62–66, 1979. doi: 10.1109/TSMC.1979.4310076.DOI
  15. [15]Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, 2021.arxiv.org/abs/2103.00020
  16. [16]Jiahun Wang, Yuxin Chen, Jun Yu, Guangming Lu, and Wenjie Pei. Editinfinity: Image editing with binary-quantized generative models. In Advances in Neural Information Processing Systems, 2025a.arxiv.org/abs/2510.20217
  17. [17]Jiangshan Wang, Junfu Pu, Zhongang Qi, Jiayi Guo, Yue Ma, Nisha Huang, Yuxin Chen, Xiu Li, and Ying Shan. Taming rectified flow for inversion and editing. In International Conference on Machine Learning, pp. 64044–64058, 2025b.arxiv.org/abs/2411.04746
  18. [18]Yufei Wang, Lanqing Guo, Zhihao Li, Jiaxing Huang, Pichao Wang, Bihan Wen, and Jian Wang. Training-free text-guided image editing with visual autoregressive model. In IEEE/CVF International Conference on Computer Vision, 2025c.arxiv.org/abs/2503.23897
  19. [19]Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4): 600–612, 2004.pubmed.ncbi.nlm.nih.gov/15376593
  20. [20]Sihan Xu, Yidong Huang, Jiayi Pan, Ziqiao Ma, and Joyce Chai. Inversion-free image editing with language-guided diffusion models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024.DOI
  21. [21]Kai Zhang, Lingbo Mo, Wenhu Chen, Huan Sun, and Yu Su. Magicbrush: A manually annotated dataset for instruction-guided image editing. In Advances in Neural Information Processing Systems, Datasets and Benchmarks Track, volume 36, 2023.arxiv.org/abs/2306.10012
  22. [22]Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2018.arxiv.org/abs/1801.03924
  23. [23]Tianrui Zhu, Shiyi Zhang, Jiawei Shao, and Yansong Tang. Kv-edit: Training-free image editing for precise background preservation. In IEEE/CVF International Conference on Computer Vision, 2025.arxiv.org/abs/2502.17363

Paper details

vlnc:W_3e79kzh3
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 2

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents