Paper deep dive
Diffusion Editing with Soft Mask: Pixel Level Redo of Image and Video with Adjustable Strength
Candi Zheng, Yuan Lan
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 92%
Last extracted: 10/2/2026, 8:49:29 AM
Summary
The paper introduces SoftPaint, a zero-shot, gradient-free sampling method for pixel-level image and video editing using diffusion models. It utilizes soft masks to control the strength of edits spatially, allowing a continuous spectrum from preserving the original content to fully re-synthesizing masked regions. The method employs a Unified Redo (UR) Score and a Diffusion-Damped Langevin (DDL) sampler to achieve smooth, high-quality edits without requiring model-specific fine-tuning or expensive pixel-wise annotations.
Entities (6)
Relation Signals (6)
SoftPaint → istypeof → Zero-shot method
confidence 95% · We introduce SoftPaint, a new zero-shot sampling method
SoftPaint → uses → Soft Mask
confidence 95% · SoftPaint, a new zero-shot sampling method that leverages soft masks to enable a continuous spectrum of edits
SoftPaint → enables → Pixel-level editing
confidence 93% · enables a continuous spectrum of edits... pixel-level control
SoftPaint → employs → Unified Redo Score
confidence 92% · SoftPaint... introduces two core innovations: (1) the Unified Redo (UR) Score
SoftPaint → employs → Diffusion-Damped Langevin
confidence 92% · (2) Diffusion-Damped Langevin (DDL), a diffusion-damped Langevin solver
SoftPaint → appliesto → Diffusion Models
confidence 90% · applies universally to image and video diffusion models
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Diffusion models with prompt and reference image-guided editing have seen rapid progress, yet they remain too coarse for pixel-level control. One promising direction is to incorporate a soft mask that specifies spatially varying edit strengths but training such fine-grained control demands expensive pixel-wise annotations, while existing zero-shot methods often yield unsatisfactory results. We introduce SoftPaint, a new zero-shot sampling method that leverages soft masks to enable a continuous spectrum of edits, from fully preserving the original content to completely re-synthesizing the masked region. Going beyond zero-shot inpainting methods, we design a Langevin-iteration-based sampler that respects per-pixel soft mask strengths, which applies universally to image and video diffusion models, enabling tasks such as video editing. The method is gradient-free, memory-efficient, and achieves smooth, pixel-level edits across multiple image and video backbones.
Tags
Links
- Source: https://arxiv.org/abs/2610.00359v1
- Canonical: https://arxiv.org/abs/2610.00359v1
Trouble viewing inline? Open PDF directly →
Full Text
64,487 characters extracted from source content.
Expand or collapse full text
Diffusion Editing with Soft Mask: Pixel Level Redo of Image and Video with Adjustable Strength Candi Zheng Yuan Lan Abstract Diffusion models with prompt and reference image-guided editing have seen rapid progress, yet they remain too coarse for pixel-level control. One promising direction is to incorporate a soft mask that specifies spatially varying edit strengths—but training such fine-grained control demands expensive pixel-wise annotations, while existing zero-shot methods often yield unsatisfactory results. We introduce SoftPaint, a new zero-shot sampling method that leverages soft masks to enable a continuous spectrum of edits, from fully preserving the original content to completely re-synthesizing the masked region. Going beyond zero-shot inpainting methods, we design a Langevin-iteration-based sampler that respects per-pixel soft mask strengths, which applies universally to image and video diffusion models, enabling tasks such as video editing. The method is gradient-free, memory-efficient, and achieves smooth, pixel-level edits across multiple image and video backbones. †footnotetext: Corresponding author: czhengac@connect.ust.hk *Equal contribution 1Department of Mathematics, Hong Kong University of Science and Technology 2Independent Researcher Reference Image Editing mask (opacity ∝ redo) Output Figure 1: Soft Image editing example. SoftPaint takes a reference image 0x_0 (left) and a continuous-opacity editing mask (middle), where the mask opacity encodes redo strength: more opaque pixels correspond to stronger redo (weaker reference tether), while more transparent pixels keep the sample closer to 0x_0 (stronger tether). This yields spatially graded edits within a single generation (right). Text prompt: “Chinese female with thick wavy black hair, white shirt, night city skyline behind, cinematic close-up.” 1 Introduction Denoising Diffusion Probabilistic Models (DDPMs) [1, 2, 3, 4, 5, 6] have emerged as powerful generative frameworks that produce high-quality outputs through iterative denoising. Subsequent advances in ODE-based deterministic samplers [7, 8, 9], as well as equivalent rectified flow models [10, 11, 12], have dramatically improved the efficiency of DDPMs, reducing the sampling steps from hundreds to dozens. Recent unified generation-and-editing models, such as FLUX.1 Kontext [13] and Qwen-Image/Qwen-Image-Edit [14], further demonstrate how these backbones now support high-quality instruction-based image editing in addition to image synthesis. Together, these innovations have broadened the scope and quality of generative visual art. Consider a digital artist or a casual user who wishes to edit an image or video. They often have a reference 0x_0 and want to modify specific parts while preserving others. While text prompts can describe the desired change, they are often too coarse to precisely specify the exact region to be modified. Binary masks, as used in standard inpainting, improve spatial control, but they still enforce a hard decision between “preserve exactly” and “change completely.” In practice, however, user intent is rarely binary; they often desire a continuous control of redo strength—for example, slightly broadening an original smile, or turning the original sky into a dramatic sunset while preserving its rough layout. A natural way to express such intent is through a soft mask, whose values specify how strongly each spatial location should adhere to the reference image. Figure 1 shows how a single generation with such a continuous-opacity mask yields a spatially graded edit. Furthermore, with the rapid release of diverse open-source models (e.g., Stable Diffusion, FLUX, Qwen-Image) from various organizations, users need a universal editing tool that works out-of-the-box for any model, without waiting for model-specific fine-tuning or training specialized adapters. This practical need for universal, fine-grained control leads to a fundamental technical challenge: Since diffusion models are trained primarily for whole-image generation, their global denoising mechanism does not naturally support such spatially varying, soft redo. The key question is: Given a diffusion prior p()p(x), how to sample from a reference-guided distribution p(∣0,)p(x _0,r)? Here 0x_0 is a given reference image and ∈[0,1]dr∈[0,1]^d is a continuous soft mask: =0r=0 means no redo (reconstruct the reference), while =1r=1 means full redo (ignore the reference and recover free generation). Figure 2 illustrates how a single scalar r shifts this balance between preservation and redo. This formulation represents a generalized inpainting problem, where binary inpainting is just a special case with ∈0,1r∈\0,1\. Current approaches to conditional sampling often face significant trade-offs. Training-based methods [15, 16, 17] are effective for binary inpainting, but extending them to soft redo is much more difficult: preparing supervision for continuous per-pixel redo strengths is expensive, typically requires enormous teams of expert human labelers. On the other hand, training-free methods often either rely on heavy gradient computations (backpropagating through the U-Net), leading to prohibitive GPU memory usage for large production models, or suffer from inferior performance. In this work, we propose SoftPaint, a pixel-level redo sampler that is model-agnostic and training-free, based on Langevin Dynamics Monte Carlo. SoftPaint supports flow models, as well as ODE- and SDE-based diffusion models. It introduces two core innovations: (1) the Unified Redo (UR) Score, a unified guided score for the entire image that combines the diffusion prior score with an analytic Gaussian tether to the reference; and (2) Diffusion-Damped Langevin (DDL), a diffusion-damped Langevin solver that improves stability under large step sizes while keeping the sampling algorithm simple. Experiments confirm that SoftPaint produces high-quality image and video inpainting, while enabling fine-grained redo control for general editing. By avoiding gradient computations, SoftPaint is memory-efficient and deployment-friendly, empowering users to perform soft redo on consumer hardware across diverse diffusion architectures. Figure 2: Fine-grained editing control: r tunes the balance between preservation and redo. 2 From Binary Mask to Soft Mask Inpainting in diffusion models traditionally relies on binary masks to distinguish between known and unknown regions. However, practical editing scenarios often require finer control over the degree of preservation for each pixel. This motivates the transition from binary inpainting to soft inpainting, where a continuous soft mask controls the redo strength. In this section, we formalize both settings and highlight the non-trivial challenges that arise when extending binary masks to continuous ones. Vanilla Diffusion Inpainting with Binary Masks Given an original image 0∈ℝH×W×3x_0 ^H× W× 3 and a binary mask ∈0,1H×Wm∈\0,1\^H× W where mij=1m_ij=1 indicates known pixels and mij=0m_ij=0 indicates missing pixels, diffusion-based inpainting aims to sample from the conditional distribution p(∣0⊙)p(x _0 ). A vanilla approach [18, 19] uses a pre-trained unconditional diffusion model and modifies the reverse process by blending the model sample tmodelx_t^model with the noised reference trefx_t^ref at each time step t, where trefx_t^ref is obtained by forward-diffusing the reference image, i.e., tref=α¯t0+1−α¯tϵx_t^ref= α_tx_0+ 1- α_t ε with ϵ∼(,) ε (0,I): ^0replace=⊙0ref+(1−)⊙^0model(xt). x_0^replace=m _0^ref+(1-m) x_0^model(x_t). (1) This hard replacement ensures exact reconstruction of known pixels while freely generating missing regions. Although plausible for binary masks, this method does not naturally extend to continuous masks. The Challenge of Continuous Masks Extending binary masks to a continuous soft mask ∈[0,1]H×Wr∈[0,1]^H× W, where rijr_ij controls the redo strength, is non-trivial. Naively generalizing Eq. (1) as ^0naive=(1−)⊙0ref+⊙^0model(xt), x_0^naive=(1-r) ^ref_0+r x_0^model(x_t), (2) Assume ^0model x_0^model and 0refx^ref_0 are meaningfully different. Then their naive combination mixes inconsistent clean images, producing blur (low likelihood under the diffusion prior). To avoid this low-likelihood outcome, the model tends to reduce the mismatch and push ^0model≈0ref x_0^model ^ref_0. As a result, outputs stay too close to the reference, so intermediate r values fail to produce proportional redo. Instead of naive blending, transitioning to soft inpainting requires a more principled formulation of the target distribution and a corresponding sampling algorithm compatible with diffusion dynamics. Desired Properties of a Soft Inpainting Formulation To address this challenge, we define a well-behaved target distribution q(∣0ref,)q(x ^ref_0,r) parameterized by the continuous soft mask ∈[0,1]H×Wr∈[0,1]^H× W, which must satisfy the following properties: 1. Well-defined distribution: q(|0ref,)q(x|x^ref_0,r) must be a valid probability density function. 2. Boundary conditions: At extreme values, q must recover standard behaviors: =0r=0 yields perfect reconstruction q(∣0ref,=0)=δ(−0ref)q(x ^ref_0,r=0)=δ(x-x^ref_0), while =1r=1 reduces to free generation q(∣0ref,=1)=p()q(x ^ref_0,r=1)=p(x). 3. Smooth interpolation: For intermediate r, q must continuously and smoothly blend between reconstruction and generation, with pixel-wise control. 4. Samplability: q should be tractable to sample using a pre-trained unconditional diffusion model without retraining. The transition from binary to soft inpainting is highly non-trivial because simple pixel-space interpolation does not yield a valid probability distribution. SoftPaint addresses this by introducing the Unified Redo (UR) Score, derived from a target distribution that satisfies above four properties and enables efficient sampling via a novel Langevin-based algorithm. 3 Methodology 3.1 Unified Redo (UR) Score Section 2 showed that a static blending weight r is too limited for continuous soft inpainting. We want the reference strength to change smoothly over time: early in sampling, the model should stay close to the reference to preserve coherence, while later it should gain more freedom to redo. We also allow the blending weight to extrapolate (exceed 11), so it can go beyond simple interpolation and actively strengthen the influence of the reference image. This extrapolation helps preserve structure and improve coherence. We propose to replace the static weight r with a time- and pixel-dependent reference blending weight (t,)∈[0,+∞)H×W γ(t,r)∈[0,+∞)^H× W. The desired clean-image estimate at time t then becomes ^0target(t)=(t,)⊙0ref+(−(t,))⊙^0model(t). x_0^target(x_t)= γ(t,r) _0^ref+ (1- γ(t,r) ) x_0^model(x_t). (3) Our goal in this section is: (i) to translate this clean-image target into a tractable sampling distribution over tx_t, and (i) to design the function (t,) γ(t,r) such that it smoothly interpolates between free generation (= γ=0) and exact reconstruction ( γ is large) while providing intuitive control via the user soft mask r. Probabilistic Reformulation. In diffusion models, guiding the sample tx_t so that its predicted clean image follows (3) is equivalent to sampling tx_t from a distribution that balances two forces: one pulling toward the reference 0refx_0^ref, and one pushing toward the model’s own prior. Because the guidance strength γt(i) _t^(i) can differ across pixels in soft inpainting scenario, we express this balance at the per-pixel level. Concretely, the target distribution corresponding to (3) over tx_t is a product of pixel-wise geometric mixtures: π(t)∝∏i[p(xt(i)∣x0(i))γt(i)⏟reference factor⋅pmodel(xt(i)∣xt(−i))1−γt(i)⏟model factor],π(x_t) _i [ p (x_t^(i) x_0^(i) )^γ^(i)_t_reference factor· p^model (x_t^(i) x_t^(-i) )^1-γ^(i)_t_model factor ], (4) where p(xt(i)∣x0(i))=(xt(i)∣α¯tx0(i),1−α¯t)p(x_t^(i) x_0^(i))=N (x_t^(i) α_tx_0^(i),1- α_t ) is the forward diffusion kernel (identical across pixels), and pmodel(xt(i)∣xt(−i))p^model(x_t^(i) x_t^(-i)) denotes the pretrained model’s implicit conditional for the i-th pixel given all other pixels denoted by xt(−i)x_t^(-i) . The exponents γt(i)γ^(i)_t and 1−γt(i)1-γ^(i)_t control the relative influence of the reference and the model at pixel i and time t. At the extremes, (4) recovers the desired boundary behaviors: when γt(i)>1 _t^(i)>1, the i-th pixel is strongly tethered to the exact forward process from x0(i)x_0^(i); when γt(i)≈0 _t^(i)≈ 0, the reference factor vanishes and the pixel relies entirely on the model. Intermediate values interpolate between these two regimes. The challenge now reduces to designing γt(i) _t^(i) such that it faithfully reflects the user’s soft inpainting intent encoded in r. Design of the Reference Blending Weight (t,) γ(t,r). A naive choice would be to set γt(i)=1−ri _t^(i)=1-r_i. As discussed in Section 2, this static weighting fails to interpolate smoothly. Probabilistically, the issue is that the probability mass of p(xt(i)∣x0(i))1−rip(x_t^(i) x_0^(i))^1-r_i is concentrated at x0(i)x_0^(i) for any constant ri<1r_i<1 when t=0t=0. To achieve genuine softness, we must allow the model to sample values near x0(i)x_0^(i) when t=0t=0. Our key insight is that a truly soft constraint should allow the generated pixel to deviate from the exact reference in a controlled manner. We realize this by imagining that the reference pixel x0(i)x_0^(i) is softened by Gaussian noise with variance Σ(i) ^(i) before being diffused. In other words, we replace the sharp likelihood p(xt(i)∣x0(i))p(x_t^(i) x_0^(i)) with a marginalized version: x~0(i)∼(x0(i),Σ(i))[p(xt(i)∣x~0(i))].E_ x_0^(i) (x_0^(i),\, ^(i)) [p(x_t^(i) x_0^(i)) ]. (5) When Σ(i) ^(i) is large, this marginal density becomes broad, permitting large deviations; as Σ(i)→0 ^(i)→ 0, it collapses back to the exact constraint. A crucial algebraic simplification (derived in Appendix D) shows that this expectation is proportional to the original diffusion kernel raised to a power: (x0(i),Σ(i))[p(xt(i)∣x~0(i))]∝p(xt(i)∣x0(i))βt(i),E_N(x_0^(i), ^(i)) [p(x_t^(i) x_0^(i)) ] p(x_t^(i) x_0^(i)) _t^(i), (6) where βt(i)=1−α¯t1−α¯t+α¯tΣ(i). _t^(i)= 1- α_t1- α_t+ α_t\, ^(i). (7) This expression suggests that βt(i) _t^(i) should serve as the base time-dependent weight for the reference term. To further extrapolate the reference strength, analogous to the guidance scale in classifier-free guidance [20], we multiply it by an additional factor (1+λ)(1+λ) with λ≥0λ≥ 0, yielding the final exponent γt(i)()=(1+λ)βt(i)=(1+λ)1−α¯t1−α¯t+α¯tΣ(i)(), _t^(i)(r)=(1+λ)\, _t^(i)=(1+λ)\, 1- α_t1- α_t+ α_t\, ^(i)(r), (8) The redo strength is controlled by the Gaussian variance Σ , which we define as a customizable function of the soft mask r: (,η)=(1+2λ)1−(1−)η(1−)η+ϵ (r;η)=(1+2λ)\, 1-(1-r)^η(1-r)^η+ε, where η>0η>0 is a hyperparameter, the fraction and exponent are applied element-wise, and ϵ=10−4ε=10^-4. Based on the ablation in Appendix C.5 (Figure 9), we use η=2η=2, which makes cliptclip_t approximately linear in r. Algorithm SoftPaint Sampling 0: Initial noise Tx_T, reference image 0refx_0^ref, soft mask r, diffusion schedule α¯tt=1T\ α_t\_t=1^T, inner Langevin steps K, step size Δτ τ 1: for t=T,…,1t=T,…,1 do 2: // Compute reference blending weight t γ_t via Eq. (8) 3: t()=(1+λ)1−α¯t1−α¯t+α¯tΣ() γ_t(r)=(1+λ)\, 1- α_t1- α_t+ α_t\, (r) 4: tref←α¯t0ref+1−α¯tϵx_t^ref← α_tx_0^ref+ 1- α_t ε 5: // Redo-aware initialization 6: ←[t>1]m [ γ_t>1] 7: ~t←(−)⊙t+⊙tref x_t←(1-m) _t+m _t^ref 8: for k=1,…,Kk=1,…,K do 9: // Compute UR score via Eq. (9) 10: (~t,t)=tα¯t0ref−~t1−α¯t+(−t)θ(~t,t)g( x_t,t)= γ_t\, α_tx_0^ref- x_t1- α_t+ (1- γ_t )\,s_θ ( x_t,t ) 11: // Diffusion-damped Langevin step 12: Update ~t x_t via one OU step (11) with τ=~tz_τ= x_t 13: end for 14: t←~tx_t← x_t 15: t−1←Denoise(t,t)x_t-1 (x_t,t) e.g., // DDIM step 16: end for 17: return 0x_0 Figure 3: Reference blending weight γt() γ_t(r) at λ=4λ=4. Curves span r=0r=0 (top, exact reconstruction) to r=1r=1 (bottom, free generation). Figure 3 shows how the blending weight γt _t varies with the noise level α¯t α_t for different mask values r. The dashed line γt=1 _t=1 separates the reference-dominated regime (γt>1 _t>1, less redo) from the model-dominated regime (γt<1 _t<1, more redo). Smaller r keeps γt _t larger across the trajectory, so the reference remains more influential, whereas larger r drives γt _t more quickly toward zero, allowing greater deviation from the reference. The Unified Redo Score. With (t,) γ(t,r) defined as above, we can convert the probabilistic mixture (4) into a practical sampling algorithm. Taking the gradient of its log-density yields the score function, we obtain the Unified Redo (UR) Score: (,t)=t()⊙α¯t0ref−1−α¯t⏟Score of pt(∣0ref)+(−t())⊙θ(,t)⏟Score of ptmodel().g(x,t)= γ_t(r) α_tx_0^ref-x1- α_t_Score of p_t(x _0^ref)+ (1- γ_t(r) ) s_θ (x,t )_Score of p_t^model(x). (9) This construction also applies to rectified flow models, since rectified flows and diffusion models are equivalent and convertible into each other. The UR score (,t)g(x,t) and its underlying distribution π(t)π(x_t) fulfill the four properties of Section 2. First, π(t)π(x_t) is a proper product of probability densities, ensuring a well-defined target. Second, the boundary conditions are met: =r=0 gives Σ=0 =0, βt=1 _t=1, and γt=1+λ _t=1+λ, which for λ=0λ=0 enforces exact reconstruction; =r=1 yields Σ→∞ →∞, βt→0 _t→ 0, and γt→0 _t→ 0, reducing g to the unconditional model score. Third, intermediate r smoothly interpolates between these extremes because Σ() (r) continuously modulates βt _t and hence γt _t. Finally, (,t)g(x,t) requires only the pretrained score models_model and an analytical reference term, making it readily samplable without retraining, as detailed in the next section. 3.2 Diffusion-Damped Langevin (DDL) The UR score (,t)g(x,t) derived in Section 3.1 defines the target distribution of the current noisy sample tx_t via Eq. (4). A standard reverse diffusion step, however, is designed to follow the model distribution pmodelp^model rather than this new target. We therefore refine tx_t at each diffusion step t by running a short inner-loop sampler driven by g before taking the denoising step to t−1t-1. We consider the overdamped Langevin dynamics (with drift g from Eq. 9): dτ=(τ,t)dτ+2dτ,dz_τ=g(z_τ,t)\,dτ+ 2\,dW_τ, (10) where τ is the inner-loop time, 0≡tz_0 _t, and τW_τ is standard Brownian motion. In practice, we perform only a few inner updates at each diffusion step t. A naive Euler discretization of Eq. (10) is unstable under strong guidance [21], so we use a damped exponential integrator. Let AtA_t be a damping coefficient and define the residual drift t():=(,t)+At.C_t(z):=g(z,t)+A_tz. Then one DDL update is τ+Δτ= _τ+ τ= e−AtΔττ+(1−e−AtΔτ)At−1t(τ) e^-A_t τz_τ+ (1-e^-A_t τ )A_t^-1C_t(z_τ) (11) +1−e−2AtΔτAt,∼(,). + 1-e^-2A_t τA_t\, ξ, ξ (0,I). where Δτ τ is the inner-loop step size and ξ is Gaussian noise. This yields a simple and stable inner-loop sampler. The derivation of Eq. (11), the choice of AtA_t, and the stability analysis are deferred to Appendix B. Redo-aware initialization. As a practical acceleration, we optionally warm-start the inner Langevin chain from a redo-aware initialization that biases strongly tethered pixels toward the noised reference. This heuristic does not change the stationary distribution and is described in Appendix C.3. Appendix C.4 compares the DDL inner loop with a RePaint-style inner loop under binary masks. 4 Experiments We evaluate SoftPaint on two soft-mask editing benchmarks: soft image editing on FlowEdit [22] (Qwen-Image [14]), and soft video editing on DAVIS-Edit [23] (CogVideoX-5B [24], Wan2.2 [25]). SoftPaint natively supports per-pixel soft masks ∈[0,1]H×Wr\!∈\![0,1]^H× W. We use uniform r within the dataset-provided region for controlled edit-strength sweeps, then evaluate a spatially varying four-zone mask separately in Table 1. A binary-mask comparison isolating the inner-loop operator appears in Appendix C.4. Hyperparameters are ablated in Appendix C. Baselines. We compare against two zero-shot methods with continuous soft-mask support: (i) Differential Diffusion (D) [26], the most relevant training-free per-pixel method; and (i) Naive mixing (n=0n=0), which disables SoftPaint’s inner Langevin loop, reducing it to per-step RePaint-style blending [19]. Where applicable we also report Qwen-Image’s instruction-tuned editor (Qwen-Image-Edit) as a single reference point. Metric anchoring. Soft-mask methods trade edit strength against reference preservation along a continuous curve; the same r corresponds to different effective edit strengths for D and SoftPaint (Fig.4 left panel). We therefore anchor all comparisons at matched CLIP-Text, a backbone-independent proxy for edit strength, and report other metrics at those anchors. 4.1 Soft-Mask Image Editing This experiment asks two questions: (i) Does SoftPaint provide finer controllability as well as smooth edit strength? (i) At matched controllability, does SoftPaint produce higher-quality edits? The FlowEdit benchmark [22] is well-suited here because its diverse object-centric masks and paired source/target prompts let us decouple “how much the edit was realized” (CLIP-Text) from “how clean the result looks” (LPIPS, PSNR, CLIP-IQA, FID). Setup. All three soft-mask methods (SoftPaint, D, and Naive Mixing) use the same Qwen-Image backbone with 2020 denoising steps on the FlowEdit benchmark [22]. SoftPaint uses n=2n=2, s=0.2s=0.2, guidance scale λ=5λ=5, where n is the number of inner iterations per diffusion step and s is the inner-loop step size. The soft-mask strength r∈0,0.1,…,1.0r∈\!\0,0.1,…,1.0\ is swept jointly across D, Naive Mixing, and SoftPaint. We also report Qwen-Image-Edit once using its default inference setting. Metrics follow the standard FlowEdit protocol: LPIPSedit_edit and PSNRedit_edit for edit quality, PSNRkeep_keep for background preservation, CLIP-Text for edit alignment, CLIP-IQA for no-reference quality, and FID for distributional realism. Edit controllability. Figure 4 (left panel) maps r to CLIP-Text for all three methods on Qwen-Image. SoftPaint shows the smoothest behavior, with CLIP-Text growing nearly linearly as r increases. D is less sensitive at low mask strength, with CLIP-Text changing more slowly in the weak-edit regime. Naive Mixing remains pinned near the source level (CLIP-T ≈29.0≈ 29.0) until r>0.8r>0.8, then overshoots to 35.435.4 at r=1.0r=1.0, indicating that it fails to provide smooth edit-strength control. The right three panels trace the quality trade-off: at matched CLIP-Text, SoftPaint achieves lower LPIPS, higher PSNR, and higher CLIP-IQA, with the gap widening at stronger edits, indicating finer controllability. Beyond training-free baselines, we also compare against Qwen-Image-Edit, a modern unified instruction-based editing model. This Qwen-Image-Edit baseline (CLIP-T 30.230.2, LPIPS 0.3060.306) appears far from both soft-mask curves, indicating worse LPIPS and PSNR; that is, although it achieves the edit goal, it deviates substantially from the given reference image. More apples-to-apples comparison is in Appendix Table 4. Equal-NFE comparison. SoftPaint uses 2020 outer steps and n=2n=2 additional inner model evaluations per step, for 6060 network function evaluations (NFE) in total. To test whether extra compute explains the Qwen-Image results, we also run D for 6060 outer steps. At the weak, medium, and strong matched-CLIP-T anchors, SoftPaint has lower LPIPSedit_edit and higher PSNRedit_edit than D at the same 6060-NFE budget. Appendix Table 3 reports all five metrics alongside the original 2020-NFE D results. Figure 4: Image-editing controllability and quality on Qwen-Image (FlowEdit Benchmark). Left: soft-mask strength r vs. CLIP-Text—SoftPaint provides the widest editing range. Right three panels: quality metrics against CLIP-Text as r sweeps from 0.10.1 to 1.01.0. SoftPaint Pareto-dominates D; Naive Mixing has near-zero controllability. Source (r=0r=0, gray square) and Qwen-Image-Edit (purple triangle) are reference points. Spatially varying redo strengths. To test nonuniform soft masks directly, we divide each FlowEdit mask into four vertical zones with strengths r∈1,0.75,0.5,0.25r∈\1,0.75,0.5,0.25\. This piecewise-constant mask assigns neighboring regions different redo strengths within the same image. The resulting CLIP-Text scores fall in the medium-edit anchor range (33.0±0.233.0± 0.2). Table 1 shows that SoftPaint improves all four reported quality metrics over D, including when D is given the same 6060-NFE budget. Table 1: Spatially varying soft-mask editing on Qwen-Image (FlowEdit). Each image uses four vertical redo-strength zones, r∈1,0.75,0.5,0.25r∈\1,0.75,0.5,0.25\. All methods are evaluated at the medium CLIP-T anchor (33.0±0.233.0± 0.2); the 6060-NFE rows compare equal model-evaluation budgets. Method NFE PSNRedit↑_edit LPIPSedit↓_edit FID↓ CLIP-IQA↑ D 20 20.3053 0.1343 102.8441 0.6088 D 60 20.2097 0.1349 103.4106 0.6045 SoftPaint 60 21.0159 0.1293 100.9059 0.6226 4.2 Soft-Mask Video Editing Setup. We run CogVideoX-5B and Wan2.2 at their official default schedules on the DAVIS-Edit [23] benchmark. The exact denoising-step settings are reported in Appendix C. SoftPaint uses n=2n=2, s=0.2s=0.2 on Wan and CogVideoX. The soft mask strength r∈0.1,…,1.0r∈\!\0.1,…,1.0\ is swept jointly across the three methods. We use the standard DAVIS-Edit protocol—per-frame PSNR/LPIPS and masked-region M-LPIPS—augmented with VFID for distributional video quality and DOVER for no-reference video aesthetics. Full-sweep comparison. Figure 6 plots the three methods across the full r sweep on both backbones. SoftPaint consistently achieves lower LPIPS, higher PSNR, and lower VFID than D at matched CLIP-Text, with the gap widening at mid-to-strong edit strengths. Naive Mixing barely shifts CLIP-Text above the source level for r<0.8r<0.8, then overshoots dramatically at r=1.0r=1.0 while quality metrics collapse. Table 2 (Appendix) provides more results compared to D at matched CLIP-T anchors . 4.3 Qualitative Comparison Figure 6 shows representative SoftPaint outputs at r=0.8r=0.8 across diverse FlowEdit prompts on Qwen-Image. The unmasked region is preserved verbatim while edits realize the requested semantic change inside the masked region. For video, Fig. 7 compares SoftPaint and D on a “Model Train” → “Wooden Train” edit on CogVideoX as the soft-mask strength r increases. SoftPaint shows a clear coarse-to-fine progression: at r=0.4r=0.4, the texture of the train head begins to change while the overall structure is still preserved; at r=0.8r=0.8, the original shape is largely maintained but the carriage is already converted to wood; at r=1.0r=1.0, the full train is transformed. This behavior is consistent with our design for soft redo strength. By contrast, D already exhibits missing front-train structure at r=0.8r=0.8, and at r=1.0r=1.0 produces obvious seams against the surrounding regions, leading to severe artifacts. Additional examples are provided in Appendix E. Figure 5: Qualitative SoftPaint image edits at r=0.8r=0.8. Each row: source, soft mask, SoftPaint output, prompt. Backbone: Qwen-Image. Figure 6: Soft video editing on DAVIS-Edit. Top: Wan2.2. Bottom: CogVideoX. Each panel plots a quality metric against CLIP-Text as the soft-mask strength r is swept. SoftPaint (red) Pareto-dominates D (blue). Naive Mixing (green circles) has near-zero controllability. Figure 7: Soft video editing: “Model Train” → “Wooden Train” at three soft-mask strengths r on CogVideoX. Top row: original DAVIS-Edit frames (r=0r=0, no edit). Subsequent rows: SoftPaint and D outputs at r=0.4r=0.4, 0.80.8, 1.01.0. 5 Related Works Diffusion Models and Image/Video Editing. Diffusion models [4] have become a dominant paradigm for high-quality image and video generation. Early work accelerated the stochastic DDPM sampling process via deterministic ODE flows, notably DDIM [27] and advanced ODE solvers, enabling fewer-step generation. Rectified flow [10, 11] further reparameterized the ODE-based diffusion with improved numerical properties, later scaling to large text-to-image and text-to-video models such as Stable Diffusion 3 [28] and FLUX [29]. Beyond generation, diffusion models have been widely adopted for image and video editing, where an input image or video together with a text prompt specifies the desired edit. A large body of work has tackled this problem from different angles: instruction-based editing via fine-tuning on paired data [30], spatial conditioning through plug-in modules [15], image-prompt adaptation with decoupled cross-attention [31], and multi-task frameworks unifying diverse editing operations [32]. More recently, large-scale proprietary models such as FLUX.2 Kontext [29] and Qwen-Image [14] have integrated reference-image conditioning directly into their training pipelines, supporting multi-reference and text-image-to-image editing with strong semantic preservation. Despite these advances, existing image and video editing models operate at the semantic level and provide limited fine-grained spatial control—users cannot specify how strongly each individual pixel should be edited. This gap motivates our approach, which introduces a soft mask mechanism for continuous, pixel-level edit-strength control in a training-free manner. Training-Free Conditional Editing with Diffusion Models. A line of training-free methods tackles conditional editing by enforcing spatial constraints during the reverse diffusion process. Langevin-based approaches [33] such as RePaint [19] and LanPaint [34] perform iterative denoise–renoise under binary inpainting masks [35], while Sequential Monte Carlo methods [36, 37] and linear-inverse-based techniques [38, 39, 40, 41, 42, 43, 44] address similar hard-constraint settings. However, these methods share two key limitations: (i) they are designed for binary masks and do not support continuous-opacity soft masks, and (i) many rely on gradient-based optimization or line search, incurring 2–4× higher GPU memory than standard inference. Differential Diffusion [26] is a notable exception that enables per-pixel edit-strength control, effectively supporting soft masks in a training-free manner. However, its underlying editing capability is limited: on binary masks it reduces to the naive replace method [19], which in turn constrains its soft-mask performance. Our proposed method, SoftPaint, addresses both gaps: it natively supports continuous soft masks with a memory-efficient, gradient-free sampler that is compatible with modern ODE-based diffusion backbones. 6 Conclusion and Limitations We introduced SoftPaint, a training-free and model-agnostic sampler for continuous soft-mask image and video editing. By combining the Unified Redo score with Diffusion-Damped Langevin, SoftPaint enables pixel-level redo control while remaining gradient-free and memory-efficient. Experiments show improved edit controllability and a better quality-preservation trade-off. A practical consideration for SoftPaint is its inference speed. As a training-free method that requires no additional optimization or fine-tuning, SoftPaint can be directly applied to any pretrained diffusion backbone with the same memory footprint as standard generation. The trade-off is that each inner Langevin iteration introduces one extra network evaluation, making the overall generation roughly 2×2×–5×5× slower than the backbone’s standard sampling. This latency can be a practical limitation for interactive editing and large-scale deployment. However,we believe the zero-training cost and universal compatibility offer a reasonable trade-off; further speed improvements are left to future work. Broader Impacts Our work can benefit creative workflows, content restoration, and research on controllable generative modeling by enabling finer image and video edits. However, the same capability could be misused to produce deceptive edits of real scenes or people. References [1] J. N. Sohl-Dickstein, E. A. Weiss, N. Maheswaranathan, and S. Ganguli (2015) Deep unsupervised learning using nonequilibrium thermodynamics. ArXiv abs/1503.03585. Cited by: §1. [2] Y. Song and S. Ermon (2019) Generative modeling by estimating gradients of the data distribution. In Neural Information Processing Systems, Cited by: §1. [3] Y. Song, J. N. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole (2020) Score-based generative modeling through stochastic differential equations. ArXiv abs/2011.13456. Cited by: §1. [4] J. Ho, A. Jain, and P. Abbeel (2020) Denoising diffusion probabilistic models. ArXiv abs/2006.11239. Cited by: §1, §5. [5] R. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer (2021) High-resolution image synthesis with latent diffusion models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 10674–10685. Cited by: §1. [6] J. Betker, G. Goh, L. Jing, T. Brooks, J. Wang, L. Li, L. Ouyang, J. Zhuang, J. Lee, Y. Guo, et al. (2023) Improving image generation with better captions. OpenAI. Cited by: §1. [7] T. Karras, M. Aittala, T. Aila, and S. Laine (2022) Elucidating the design space of diffusion-based generative models. ArXiv abs/2206.00364. Cited by: §1. [8] C. Lu, Y. Zhou, F. Bao, J. Chen, C. Li, and J. Zhu (2022) DPM-solver++: fast solver for guided sampling of diffusion probabilistic models. ArXiv abs/2211.01095. Cited by: §1. [9] W. Zhao, L. Bai, Y. Rao, J. Zhou, and J. Lu (2023) UniPC: a unified predictor-corrector framework for fast sampling of diffusion models. ArXiv abs/2302.04867. Cited by: §1. [10] Y. Lipman, R. T. Chen, H. Ben-Hamu, M. Nickel, and M. Le (2022) Flow matching for generative modeling. arXiv preprint arXiv:2210.02747. Cited by: §1, §5. [11] X. Liu, C. Gong, and Q. Liu (2022) Flow straight and fast: learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.03003. Cited by: §1, §5. [12] R. Gao, E. Hoogeboom, J. Heek, V. D. Bortoli, K. P. Murphy, and T. Salimans (2025) Diffusion models and gaussian flow matching: two sides of the same coin. In The Fourth Blogpost Track at ICLR 2025, External Links: Link Cited by: §1. [13] B. F. Labs, S. Batifol, A. Blattmann, F. Boesel, S. Consul, C. Diagne, T. Dockhorn, J. English, Z. English, P. Esser, S. Kulal, K. Lacey, Y. Levi, C. Li, D. Lorenz, J. Müller, D. Podell, R. Rombach, H. Saini, A. Sauer, and L. Smith (2025) FLUX.1 kontext: flow matching for in-context image generation and editing in latent space. External Links: 2506.15742, Link Cited by: §1. [14] C. Wu, J. Li, J. Zhou, J. Lin, K. Gao, K. Yan, S. Yin, S. Bai, X. Xu, Y. Chen, Y. Chen, Z. Tang, Z. Zhang, Z. Wang, A. Yang, B. Yu, C. Cheng, D. Liu, D. Li, H. Zhang, H. Meng, H. Wei, J. Ni, K. Chen, K. Cao, L. Peng, L. Qu, M. Wu, P. Wang, S. Yu, T. Wen, W. Feng, X. Xu, Y. Wang, Y. Zhang, Y. Zhu, Y. Wu, Y. Cai, and Z. Liu (2025) Qwen-image technical report. External Links: 2508.02324, Link Cited by: §1, §4, §5. [15] L. Zhang, A. Rao, and M. Agrawala (2023) Adding conditional control to text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, p. 3836–3847. Cited by: §1, §5. [16] T. Mayet, P. Shamsolmoali, S. Bernard, E. Granger, R. Hérault, and C. Chatelain (2024) TD-paint: faster diffusion inpainting through time aware pixel conditioning. arXiv preprint arXiv:2410.09306. Cited by: §1. [17] J. Zhuang, Y. Zeng, W. Liu, C. Yuan, and K. Chen (2024) A task is worth one word: learning with task prompts for high-quality versatile image inpainting. In European Conference on Computer Vision, p. 195–211. Cited by: §1. [18] Y. Song and S. Ermon (2019) Generative modeling by estimating gradients of the data distribution. Advances in neural information processing systems 32. Cited by: §C.4, Table 6, §2. [19] A. Lugmayr, M. Danelljan, A. Romero, F. Yu, R. Timofte, and L. Van Gool (2022) Repaint: inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, p. 11461–11471. Cited by: §C.4, Table 6, §2, §4, §5, §5. [20] J. Ho and T. Salimans (2022) Classifier-free diffusion guidance. ArXiv abs/2207.12598. Cited by: §3.1. [21] C. Zheng and Y. Lan (2024) Characteristic guidance: non-linear correction for diffusion model at large guidance scale. In Forty-first International Conference on Machine Learning, External Links: Link Cited by: §3.2. [22] V. Kulikov, M. Kleiner, I. Huberman-Spiegelglas, and T. Michaeli (2025) Flowedit: inversion-free text-based editing using pre-trained flow models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, p. 19721–19730. Cited by: §4.1, §4.1, §4. [23] C. Liu, R. Li, K. Zhang, Y. Lan, and D. Liu (2024) StableV2V: stablizing shape consistency in video-to-video editing. External Links: 2411.11045 Cited by: §4.2, §4. [24] Z. Yang, J. Teng, W. Zheng, M. Ding, S. Huang, J. Xu, Y. Yang, W. Hong, X. Zhang, G. Feng, et al. (2024) CogVideoX: text-to-video diffusion models with an expert transformer. arXiv preprint arXiv:2408.06072. Cited by: §4. [25] T. Wan, A. Wang, B. Ai, B. Wen, C. Mao, C. Xie, D. Chen, F. Yu, H. Zhao, J. Yang, J. Zeng, J. Wang, J. Zhang, J. Zhou, J. Wang, J. Chen, K. Zhu, K. Zhao, K. Yan, L. Huang, M. Feng, N. Zhang, P. Li, P. Wu, R. Chu, R. Feng, S. Zhang, S. Sun, T. Fang, T. Wang, T. Gui, T. Weng, T. Shen, W. Lin, W. Wang, W. Wang, W. Zhou, W. Wang, W. Shen, W. Yu, X. Shi, X. Huang, X. Xu, Y. Kou, Y. Lv, Y. Li, Y. Liu, Y. Wang, Y. Zhang, Y. Huang, Y. Li, Y. Wu, Y. Liu, Y. Pan, Y. Zheng, Y. Hong, Y. Shi, Y. Feng, Z. Jiang, Z. Han, Z. Wu, and Z. Liu (2025) Wan: open and advanced large-scale video generative models. arXiv preprint arXiv:2503.20314. Cited by: §4. [26] E. Levin and O. Fried (2025) Differential diffusion: giving each pixel its strength. In Computer Graphics Forum, p. e70040. Cited by: §4, §5. [27] J. Song, C. Meng, and S. Ermon (2020) Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502. Cited by: §5. [28] P. Esser, S. Kulal, A. Blattmann, R. Entezari, J. Müller, H. Saini, Y. Levi, D. Lorenz, A. Sauer, F. Boesel, et al. (2024) Scaling rectified flow transformers for high-resolution image synthesis. In Forty-first international conference on machine learning, Cited by: §5. [29] Black Forest Labs (2025) FLUX.2: towards interactive visual intelligence. Note: https://bfl.ai/researchTechnical report Cited by: §5, §5. [30] T. Brooks, A. Holynski, and A. A. Efros (2023) InstructPix2Pix: learning to follow image editing instructions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 18392–18402. Cited by: §5. [31] H. Ye, J. Zhang, S. Liu, X. Han, and W. Yang (2023) Ip-adapter: text compatible image prompt adapter for text-to-image diffusion models. arXiv preprint arXiv:2308.06721. Cited by: §5. [32] S. Sheynin, A. Polyak, U. Singer, Y. Kirstain, A. Zohar, O. Ashual, D. Parikh, and Y. Taigman (2023) Emu edit: precise image editing via recognition and generation tasks. arXiv preprint arXiv:2311.10089. Cited by: §5. [33] C. Zheng and Y. Lan (April 27, 2026) Rethinking the diffusion model from a langevin perspective. In ICLR Blogposts 2026, External Links: Link Cited by: §5. [34] C. Zheng, Y. Lan, and Y. Wang (2025) LanPaint: training-free diffusion inpainting with asymptotically exact and fast conditional sampling. Transactions on Machine Learning Research. Note: External Links: ISSN 2835-8856, Link Cited by: Appendix B, §5. [35] L. Cornwall, J. Meyers, J. Day, L. S. Wollman, N. Dalchau, and A. Sim (2024) Training-free guidance of diffusion models for generalised inpainting. External Links: Link Cited by: §5. [36] L. Wu, B. Trippe, C. Naesseth, D. Blei, and J. P. Cunningham (2024) Practical and asymptotically exact conditional sampling in diffusion models. Advances in Neural Information Processing Systems 36. Cited by: §5. [37] B. L. Trippe, J. Yim, D. Tischer, D. Baker, T. Broderick, R. Barzilay, and T. Jaakkola (2022) Diffusion probabilistic modeling of protein backbones in 3d for the motif-scaffolding problem. arXiv preprint arXiv:2206.04119. Cited by: §5. [38] H. Chung, B. Sim, D. Ryu, and J. C. Ye (2022) Improving diffusion models for inverse problems using manifold constraints. Advances in Neural Information Processing Systems 35, p. 25683–25696. Cited by: §5. [39] H. Chung, J. Kim, M. T. Mccann, M. L. Klasky, and J. C. Ye (2022) Diffusion posterior sampling for general noisy inverse problems. arXiv preprint arXiv:2209.14687. Cited by: §5. [40] A. Grechka, G. Couairon, and M. Cord (2024) GradPaint: gradient-guided inpainting with diffusion models. Computer Vision and Image Understanding 240, p. 103928. Cited by: §5. [41] Y. Janati, B. Moufad, A. Durmus, E. Moulines, and J. Olsson (2024) Divide-and-conquer posterior sampling for denoising diffusion priors. External Links: 2403.11407, Link Cited by: §5. [42] B. Kawar, M. Elad, S. Ermon, and J. Song (2022) Denoising diffusion restoration models. Advances in Neural Information Processing Systems 35, p. 23593–23606. Cited by: §5. [43] G. Zhang, J. Ji, Y. Zhang, M. Yu, T. S. Jaakkola, and S. Chang (2023) Towards coherent image inpainting using denoising diffusion implicit models. Cited by: §5. [44] F. Rozet, G. Andry, F. Lanusse, and G. Louppe (2024) Learning diffusion priors from observations by expectation maximization. Advances in Neural Information Processing Systems 37, p. 87647–87682. Cited by: §5. [45] P. Dhariwal and A. Nichol (2021) Diffusion models beat gans on image synthesis. ArXiv abs/2105.05233. Cited by: §C.4. Appendix A Additional Tables This section provides the detailed matched-CLIP-T tables referenced in the main experiments. Table 2 complements Section 4.2 with anchor-based comparisons on DAVIS-Edit, and Tables 3 and 4 complement Section 4.1 with equal-NFE and matched-CLIP-T results on FlowEdit. Table 2: Video-editing on DAVIS-Edit at matched CLIP-T. Anchors are SoftPaint at r∈0.2,0.5,1.0r∈\0.2,0.5,1.0\ (Wan2.2) and r∈0.2,0.5,0.9r∈\0.2,0.5,0.9\ (CogVideoX). For D we select the nearest measured r within ±0.5± 0.5 of each anchor. Backbone Anchor Method r used LPIPS↓ PSNR↑ M-LPIPS↓ VFID↓ DOVER↑ Wan2.2 V2V Weak Edit (CLIP-T: 19.7± 0.5) D 0.1 0.053 27.34 0.022 0.109 54.46 SoftPaint 0.2 0.045 29.36 0.015 0.080 55.55 Medium Edit (CLIP-T: 20.0± 0.5) D 0.2 0.062 25.61 0.029 0.147 54.39 SoftPaint 0.5 0.051 27.80 0.020 0.106 55.63 Strong Edit (CLIP-T: 24.2± 0.5) D 0.8 0.104 20.07 0.065 0.275 55.06 SoftPaint 1.0 0.099 21.51 0.060 0.245 54.60 CogVideoX Weak Edit (CLIP-T: 20.6± 0.5) D 0.4 0.046 27.83 0.022 0.113 56.59 SoftPaint 0.2 0.043 29.15 0.019 0.112 56.39 Medium Edit (CLIP-T: 22.4± 0.5) D 0.6 0.059 25.15 0.033 0.171 56.79 SoftPaint 0.5 0.056 26.59 0.030 0.171 57.13 Strong Edit (CLIP-T: 24.7± 0.5) D 1.0 0.101 20.05 0.066 0.287 52.54 SoftPaint 0.9 0.089 21.57 0.058 0.250 54.53 Table 3: Image editing at matched NFE on Qwen-Image (FlowEdit). SoftPaint uses 2020 outer steps and two additional inner evaluations per step (6060 NFE); D uses 2020 or 6060 outer steps. Rows within each block are selected at the same CLIP-T anchor. The D 2020-NFE and SoftPaint 6060-NFE rows reproduce the corresponding values in Table 4. Anchor Method NFE LPIPSedit↓_edit PSNRedit↑_edit PSNRkeep↑_keep CLIP-IQA↑ FID↓ Weak Edit (CLIP-T: 30.1± 0.2) D 20 0.082 25.34 65.54 0.626 56.3 D 60 0.088 25.19 65.50 0.620 54.33 SoftPaint 60 0.075 26.36 66.31 0.626 52.7 Medium Edit (CLIP-T: 33.0± 0.2) D 20 0.131 21.31 65.34 0.619 102.2 D 60 0.134 20.80 65.25 0.613 106.4 SoftPaint 60 0.121 22.05 66.29 0.627 99.9 Strong Edit (CLIP-T: 35.5± 0.2) D 20 0.225 16.10 64.95 0.584 163.2 D 60 0.224 15.88 64.94 0.581 160.01 SoftPaint 60 0.214 16.28 65.98 0.597 157.2 Table 4: Image-editing on Qwen-Image at matched CLIP-T. Anchors are SoftPaint at r∈0.2,0.6,1.0r∈\0.2,0.6,1.0\. For D and Naive Mixing we select the nearest measured r within ±0.2± 0.2 CLIP-T of each anchor. Source is listed for reference. Naive Mixing has no match at the medium anchor. Anchor Method r used LPIPSedit↓_edit\! PSNRedit↑_edit\! PSNRkeep↑_keep\! CLIP-IQA↑ FID↓ Reference Points NA Source 0 0.000 80.00 80.00 0.650 0.0 NA QwenImage-Edit NA 0.306 16.19 25.39 0.667 129.5 Soft-Mask Methods Weak Edit (CLIP-T: 30.1± 0.2) Naive Mixing 0.8 0.057 28.92 65.58 0.595 46.2 D 0.4 0.082 25.34 65.54 0.626 56.3 SoftPaint 0.2 0.075 26.36 66.31 0.626 52.7 Medium Edit (CLIP-T: 33.0± 0.2) Naive Mixing — — — — — — D 0.7 0.131 21.31 65.34 0.619 102.2 SoftPaint 0.6 0.121 22.05 66.29 0.627 99.9 Strong Edit (CLIP-T: 35.5± 0.2) Naive Mixing 1.0 0.225 16.09 64.98 0.580 164.1 D 1.0 0.225 16.10 64.95 0.584 163.2 SoftPaint 1.0 0.214 16.28 65.98 0.597 157.2 Appendix B Derivation of the DDL Update This section derives the damped exponential-integrator update used in the main text. Starting from the Langevin dynamics in Eq. (10), a naive Euler–Maruyama discretization requires very small step sizes because the UR score contains a stiff linear component. Expanding Eq. (9) and expressing the model score via Tweedie’s formula, model(,t)=α¯t^0(,t)−1−α¯t,s_model(z,t)= α_t\, x_0(z,t)-z1- α_t, gives (,t)=−1−α¯t⏟linear term+α¯t1−α¯t(t0ref+(−t)^0(,t))⏟nonlinear remainder,g(z,t)= - 11- α_t\,z_ linear term\;+\; α_t1- α_t ( γ_tx_0^ref+(1- γ_t)\, x_0(z,t) )_ nonlinear remainder, (12) where ^0 x_0 is the model’s denoised estimate. The coefficient (1−α¯t)−1(1- α_t)^-1 becomes large when 1−α¯t1- α_t is small, which makes explicit Euler steps numerically fragile. To stabilise the inner-loop sampler, we split the drift into a linear damping term and a remainder: (,t)=−At+t(),t():=(,t)+At.g(z,t)=-A_tz+C_t(z), _t(z):=g(z,t)+A_tz. (13) In practice, we choose At=1+λβt()1−α¯t,A_t= 1+λ _t(r)1- α_t, so that the damping strength increases with the guidance factor λβt()λ _t(r) and remains stable even when λ is large. This damping rule is a simplified variant of the damped Langevin dynamics introduced in LanPaint [34]. If we treat t()C_t(z) as approximately constant over a short interval Δτ τ, the SDE becomes an Ornstein–Uhlenbeck process with a closed-form transition, yielding Eq. (11). This update uses one score evaluation per step and remains stable for arbitrarily large Δτ τ. In the limit Δτ→∞ τ→∞, it relaxes to the stationary Gaussian (At−1t,At−1).N(A_t^-1C_t,\,A_t^-1I). The corresponding limiting variance is At−1=1−α¯t1+λβt()⪯(1−α¯t),A_t^-1I= 1- α_t1+λ _t(r)I\; \;(1- α_t)I, which is bounded above by the natural diffusion variance. Therefore, the sampling trajectory remains contained even under strong guidance, unlike standard Langevin updates with overly large explicit step sizes. Appendix C Ablation Studies For completeness, the main video experiments use the official default denoising schedules of each backbone: 5050 steps for CogVideoX-5B and 4040 steps for Wan2.2. We ablate SoftPaint’s two inner-loop hyperparameters—Langevin step size s and number of inner updates n—on the Wan2.2 backbone over DAVIS-Edit, averaging all metrics across r∈0.2,0.4,0.6,0.8,1.0r∈\0.2,0.4,0.6,0.8,1.0\ to avoid cherry-picking a single operating point. We use these same defaults (n=2n=2, s=0.2s=0.2) for image editing without any per-domain re-tuning. C.1 Inner-loop hyperparameters Figure 8 reports PSNR, LPIPS, CLIP-Text, and VFID against n (top row, s=0.2s=0.2 fixed) and s (bottom row, n=2n=2 fixed). Increasing n from 0 to 2 improves PSNR by +1.05+1.05 and lowers LPIPS by 0.00530.0053; n=3→5n=3→5 adds only marginal gains (+0.43+0.43 PSNR) while raising the inner-loop cost 2.5×2.5×. Similarly, increasing s from 0.050.05 to 0.20.2 yields +0.65+0.65 PSNR with diminishing returns beyond s=0.2s=0.2. The sweet spot n=2n=2, s=0.2s=0.2 balances quality and compute—a single Langevin step (n=1n=1) is too noisy, while larger budgets bring negligible improvement. Figure 8: Ablation of n and s on soft video editing task(DAVIS-Edit) under backbone Wan2.2. Top: n varied with s=0.2s=0.2 fixed. Bottom: s varied with n=2n=2 fixed. All metrics averaged over r∈0.2,0.4,0.6,0.8,1.0r∈\0.2,0.4,0.6,0.8,1.0\. n=2n=2, s=0.2s=0.2 are the default operating point, also used for image editing without re-tuning. C.2 Runtime SoftPaint’s runtime is dominated by the inner-loop budget n, since each inner DDL update reuses the backbone denoiser. On Qwen-Image (roughly 20B MMDiT) at 1024×10241024× 1024 with 2020 diffusion steps on a single accelerator with approximately 6565 TFLOPS of FP16 compute, measuring only the CUDA-synchronized denoising loop (excluding model loading, encoder passes, VAE decoding, and post-processing), D averages 10.210.2 s/image while SoftPaint with n=2n=2 averages 29.429.4 s/image. SoftPaint uses the same peak GPU memory as standard forward-only backbone inference, i.e., it does not introduce extra memory beyond ordinary inference. C.3 Redo-aware warm start Before running the inner Langevin loop, we optionally initialise the chain from a redo-aware warm start instead of the raw model sample tx_t. Recall from Eq. (8) that γt(i)>1 _t^(i)>1 corresponds to the extrapolation regime, where the reference constraint is amplified. For such pixels, it is beneficial to initialise directly from the noised reference tref=α¯t0ref+1−α¯tϵx_t^ref= α_tx_0^ref+ 1- α_t ε rather than from tx_t. Concretely, we define a binary mask =[t()>1]m=I[ γ_t(r)>1] and set ~t=(−)⊙t+⊙tref. x_t=(1-m) _t+m _t^ref. This warm start does not alter the stationary distribution of the inner Langevin chain; its sole purpose is to shorten burn-in. Without it, the chain initialises at a low-likelihood point of π(t)π(x_t) and, at our small budget of n=2n=2, leaves residual noise at mask boundaries. Table 5 isolates the r=0.8r=0.8 case, where the difference between the three configurations is especially clear. Naive mixing stays highly similar to the source and has very low CLIP-T, indicating almost no editing ability at this mask strength. Adding the warm start substantially improves editability, as reflected by the large CLIP-T increase. SoftPaint further adds the UR score and the DDL Langevin inner loop, improving editability again while also improving LPIPS and VFID relative to the warm-start-only variant. Table 5: Warm-start ablation for soft video editing at r=0.8r=0.8 on the CogVideoX backbone. Naive mixing has almost no editing ability at this mask strength. Adding the warm start restores editing, and SoftPaint further improves editability with the UR score and DDL Langevin inner loop while improving LPIPS and VFID relative to warm start alone. All rows use 50 denoising steps. Method PSNR↑ LPIPS↓ CLIP-T↑ VFID↓ Naive mix. 32.46 0.0333 19.95 almost no edit 0.0668 Naive mix. + warm start 22.22 0.0786 24.10 ↑ edit 0.2410 SoftPaint 23.15 0.0757 24.32 ↑ edit 0.2305 Note: Lower PSNR here mainly reflects larger deviation from the source under stronger edits, rather than worse perceptual quality. C.4 Binary-mask inpainting: isolating the inner-loop operator We also test whether the DDL update offers a benefit beyond repeated denoise–replace–renoise updates under binary masks. On the ImageNet binary-inpainting benchmark, we use 1,0001,000 validation images at 256×256256× 256 resolution, an ADM diffusion model [45], 2020 outer Euler steps, and box or checkerboard masks. The comparison holds the outer schedule and binary mask fixed. Replace [18] uses no inner loop; the RePaint-style [19] and SoftPaint variants use the same number of inner iterations and matched model-evaluation budgets at each n. Table 6 reports LPIPS and FID for n∈5,10n∈\5,10\. SoftPaint yields lower values than the RePaint-style inner loop on both masks at both budgets. The comparison isolates the gain from DDL in the binary-mask setting, where spatially varying soft-mask weights are absent. Replace is included as a 2020-step reference and does not have the same NFE as the two iterative variants. Table 6: Binary inpainting on ImageNet with ADM. LPIPS ↓ / FID ↓ on 1,0001,000 validation images at 256×256256× 256. All methods use 2020 outer Euler steps. RePaint-style and SoftPaint have matched inner-loop budgets for each n; Replace has no inner loop. Mask Inner steps n Replace [18] RePaint-style [19] SoftPaint Box 5 0.229 / 75.7 0.216 / 62.8 0.174 / 48.1 10 0.215 / 61.0 0.165 / 43.5 Checkerboard 5 0.406 / 146.4 0.137 / 31.4 0.118 / 21.6 10 0.135 / 32.8 0.110 / 19.9 C.5 Choice of exponent η in Σ(,η) (r;η) We also ablate the exponent η in Σ(,η)=(1+2λ)1−(1−)η(1−)η+ϵ (r;η)=(1+2λ)\, 1-(1-r)^η(1-r)^η+ε. Figure 9 compares η=2η=2 and η=4η=4 on the Flow Edit Benchmark with the Qwen-Image model. We choose η=2η=2 because it makes cliptclip_t approximately linear in r, yielding a more predictable mapping from mask value to redo strength. Figure 9: Effect of the exponent η in Σ(,η) (r;η) on edit strength, measured on the Flow Edit Benchmark with the Qwen-Image model. The two curves correspond to η=2η=2 and η=4η=4, showing how the choice of exponent changes the effective redo strength for each mask value r, and hence cliptclip_t. Appendix D Derivation of the Expectation Form for the Reference Factor We start from the forward transition density p(xt(i)∣x0(i))=(xt(i)∣α¯tx0(i), 1−α¯t)∝exp(−(xt(i)−α¯tx0(i))22(1−α¯t)).p(x_t^(i) x_0^(i))=N\! (x_t^(i) α_t\,x_0^(i),\,1- α_t ) \! (- (x_t^(i)- α_t\,x_0^(i))^22(1- α_t) ). (14) Raising this density to the power γt(i) _t^(i) and absorbing constants into proportionality gives p(xt(i)∣x0(i))γt(i)∝exp(−γt(i)(xt(i)−α¯tx0(i))22(1−α¯t)).p(x_t^(i) x_0^(i)) _t^(i) \! (- _t^(i)(x_t^(i)- α_t\,x_0^(i))^22(1- α_t) ). (15) We choose γt(i)=(1+λ)βt(i)(),βt(i)()=1−α¯t1−α¯t+α¯tΣ(i)(). _t^(i)=(1+λ)\, _t^(i)(r), _t^(i)(r)= 1- α_t1- α_t+ α_t\, ^(i)(r). (16) Substituting γt(i) _t^(i) into the exponent yields p(xt(i)∣x0(i))γt(i) p(x_t^(i) x_0^(i)) _t^(i) ∝exp(−(1+λ)βt(i)()(xt(i)−α¯tx0(i))22(1−α¯t)) \! (- (1+λ)\, _t^(i)(r)\,(x_t^(i)- α_t\,x_0^(i))^22(1- α_t) ) =exp(−1+λ2(1−α¯t+α¯tΣ(i)())(xt(i)−α¯tx0(i))2). = \! (- 1+λ2 (1- α_t+ α_t\, ^(i)(r) ) (x_t^(i)- α_t\,x_0^(i) )^2 ). (17) Now consider the expectation under a Gaussian smoothing distribution x~0(i)∼(x0(i),Σ(i)()) x_0^(i) (x_0^(i), ^(i)(r) ): x~0(i)[p(xt(i)∣x~0(i))]∝∫exp(−(xt(i)−α¯tx~0(i))22(1−α¯t))exp(−(x~0(i)−x0(i))22Σ(i)())dx~0(i).E_ x_0^(i) [p(x_t^(i) x_0^(i)) ] \! (- (x_t^(i)- α_t\, x_0^(i))^22(1- α_t) ) \! (- ( x_0^(i)-x_0^(i))^22 ^(i)(r) )d x_0^(i). (18) The integrand is a product of two Gaussian exponents. Completing the square in x~0(i) x_0^(i) and integrating out the variable leaves an exponent that depends only on xt(i)x_t^(i) and x0(i)x_0^(i). The result (up to a constant factor) is x~0(i)[p(xt(i)∣x~0(i))]∝exp(−(xt(i)−α¯tx0(i))22(1−α¯t+α¯tΣ(i)())).E_ x_0^(i) [p(x_t^(i) x_0^(i)) ] \! (- (x_t^(i)- α_t\,x_0^(i))^22 (1- α_t+ α_t\, ^(i)(r) ) ). (19) Raising this expectation to the power 1+λ1+λ gives [x~0(i)p(xt(i)∣x~0(i))]1+λ∝exp(−1+λ2(1−α¯t+α¯tΣ(i)())(xt(i)−α¯tx0(i))2). [E_ x_0^(i)\,p(x_t^(i) x_0^(i)) ]^1+λ \! (- 1+λ2 (1- α_t+ α_t\, ^(i)(r) ) (x_t^(i)- α_t\,x_0^(i) )^2 ). (20) Comparing (17) and (20), we observe that the two expressions share exactly the same functional form in xt(i)x_t^(i). Since normalising constants do not affect the reverse sampling dynamics, we conclude p(xt(i)∣x0(i))γt(i)∝[x~0(i)∼(x0(i),Σ(i)())p(xt(i)∣x~0(i))]1+λ,p\! (x_t^(i) x_0^(i) )^γ^(i)_t [E_ x_0^(i) (x_0^(i), ^(i)(r))\,p(x_t^(i) x_0^(i)) ]^1+λ, (21) which justifies the choice of γt(i)γ^(i)_t stated in the main text. Appendix E Additional Qualitative Results Figure 10: Soft-mask image editing: “Dalmatian” → “Cheetah”. Source: “A Dalmatian dog sitting on a white background…” Target: “A cheetah sitting on a white background…, looking to the camera.” Top: Naive Mixing. Middle: D. Bottom: SoftPaint (ours). r∈0.1,…,1.0r∈\0.1,…,1.0\ left to right; mask inset at top-right. Figure 11: Soft-mask image editing: “Pink Flowers” → “Orange Flowers”. Source: “A vase filled with a beautiful bouquet of pink, red and white flowers.” Target: “…orange, yellow and white flowers.” Layout as in Fig. 10. Figure 12: Soft-mask video editing: “Dog” → “Wolf” at three soft-mask strengths r on CogVideoX. Top row: original DAVIS-Edit frames (r=0r=0, no edit). Subsequent rows: SoftPaint and D outputs at r=0.4r=0.4, 0.80.8, 1.01.0.