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.
Figures & tables
Figure 1: Soft Image editing example . SoftPaint takes a reference image x0 (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 x0 (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.”
Figure 2: Fine-grained editing control: r tunes the balance between preservation and redo.
Figure 3: Reference blending weight γt(r) at λ=4 . Curves span r=0 (top, exact reconstruction) to r=1 (bottom, free generation).
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.1 to 1.0 . SoftPaint Pareto-dominates DD; Naive Mixing has near-zero controllability. Source ( r=0 , gray square) and Qwen-Image-Edit (purple triangle) are reference points.
Method
NFE
PSNR edit↑
LPIPS edit↓
FID ↓
CLIP-IQA ↑
DD
20
20.3053
0.1343
102.8441
0.6088
DD
60
20.2097
0.1349
103.4106
0.6045
SoftPaint
60
21.0159
0.1293
100.9059
0.6226
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.25} . All methods are evaluated at the medium CLIP-T anchor ( 33.0±0.2 ); the 60 -NFE rows compare equal model-evaluation budgets.
Figure 6
Figure 7: Soft video editing: “Model Train” → “Wooden Train” at three soft-mask strengths r on CogVideoX. Top row: original DAVIS-Edit frames ( r=0 , no edit). Subsequent rows: SoftPaint and DD outputs at r=0.4 , 0.8 , 1.0 .
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Backbone
Anchor
Method
r used
LPIPS ↓
PSNR ↑
M-LPIPS ↓
VFID ↓
DOVER ↑
Wan2.2 V2V
Weak Edit (CLIP-T: 19.7 ± 0.5)
DD
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)
DD
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)
DD
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
Appendix
Table 2: Video-editing on DAVIS-Edit at matched CLIP-T. Anchors are SoftPaint at r∈{0.2,0.5,1.0} (Wan2.2) and r∈{0.2,0.5,0.9} (CogVideoX). For DD we select the nearest measured r within ±0.5 of each anchor.
Anchor
Method
NFE
LPIPS edit↓
PSNR edit↑
PSNR keep↑
CLIP-IQA ↑
FID ↓
Weak Edit (CLIP-T: 30.1 ± 0.2)
DD
20
0.082
25.34
65.54
0.626
56.3
DD
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)
DD
20
0.131
21.31
65.34
0.619
102.2
DD
60
0.134
20.80
65.25
0.613
106.4
SoftPaint
60
0.121
22.05
66.29
0.627
99.9
Appendix
Table 3: Image editing at matched NFE on Qwen-Image (FlowEdit). SoftPaint uses 20 outer steps and two additional inner evaluations per step ( 60 NFE); DD uses 20 or 60 outer steps. Rows within each block are selected at the same CLIP-T anchor. The DD 20 -NFE and SoftPaint 60 -NFE rows reproduce the corresponding values in Table 4 .
Anchor
Method
r used
LPIPS edit↓
PSNR edit↑
PSNR 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
DD
0.4
0.082
25.34
65.54
0.626
56.3
Appendix
Table 4: Image-editing on Qwen-Image at matched CLIP-T. Anchors are SoftPaint at r∈{0.2,0.6,1.0} . For DD and Naive Mixing we select the nearest measured r within ±0.2 CLIP-T of each anchor. Source is listed for reference. Naive Mixing has no match at the medium anchor.
Figure 8: Ablation of n and s on soft video editing task(DAVIS-Edit) under backbone Wan2.2. Top: n varied with s=0.2 fixed. Bottom: s varied with n=2 fixed. All metrics averaged over r∈{0.2,0.4,0.6,0.8,1.0} . n=2 , s=0.2 are the default operating point, also used for image editing without re-tuning.
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
Appendix
Table 5: Warm-start ablation for soft video editing at r=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.
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
Appendix
Table 6: Binary inpainting on ImageNet with ADM. LPIPS ↓ / FID ↓ on 1,000 validation images at 256×256 . All methods use 20 outer Euler steps. RePaint-style and SoftPaint have matched inner-loop budgets for each n ; Replace has no inner loop.
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 and η=4 , showing how the choice of exponent changes the effective redo strength for each mask value r , and hence clipt .
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: DD. Bottom: SoftPaint (ours). r∈{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=0 , no edit). Subsequent rows: SoftPaint and DD outputs at r=0.4 , 0.8 , 1.0 .
City University of Hong Kong (Dongguan), Guangdong, China · City University of Hong Kong, Hong Kong, China · Mohamed bin Zayed University of Artificial Intelligence, Masdar, Abu Dhabi