TL;DR
SoftPaint is a training-free, model-agnostic sampling method that enables pixel-level control over image and video editing using continuous "soft masks." By combining a novel Unified Redo (UR) Score with a stable Diffusion-Damped Langevin (DDL) sampler, it allows users to smoothly dial in the strength of an edit—from subtle texture changes to complete re-synthesis—without the need for expensive retraining or high-memory gradient computations.
What Problem Does This Paper Address?
While diffusion models have revolutionized image and video editing, they often lack precision. Standard inpainting relies on binary masks, which force an "all-or-nothing" choice: a pixel is either perfectly preserved or completely replaced.
In real-world creative work, users often want something in between—like subtly broadening a smile, changing the fabric of a shirt while keeping its folds, or turning a daylight sky into a sunset while maintaining the clouds' shapes. This requires soft masks (where values between 0 and 1 represent "redo strength").
Existing solutions to this problem fall into two camps, both with flaws:
- Training-based methods: These require massive, expensive datasets of pixel-wise annotations to learn fine-grained control.
- Zero-shot methods: These often produce blurry results because they naively blend pixels (which the diffusion prior dislikes) or require backpropagating through the U-Net, which consumes massive amounts of GPU memory.
Methods
The authors introduce SoftPaint, a zero-shot sampling framework that works "out-of-the-box" with existing models like FLUX, Stable Diffusion, or CogVideoX. Its architecture rests on two pillars:
- Unified Redo (UR) Score: Instead of simple pixel blending, the authors formulate a target distribution as a geometric mixture of the model’s prior and an analytic "Gaussian tether" to the reference image. Crucially, they design a time-dependent weighting function ($\gamma$) that ensures the reference image guides the structure early in the sampling process but allows the model more freedom to "redo" details in the later stages.
- Diffusion-Damped Langevin (DDL): To sample from this new distribution, the authors use Langevin Dynamics. However, standard Langevin solvers become unstable under the "strong guidance" needed for precise editing. SoftPaint uses a damped exponential integrator (inspired by the Ornstein-Uhlenbeck process). This keeps the sampling trajectory stable and contained within the natural diffusion variance, even with large step sizes.
- Redo-Aware Initialization: To speed up convergence, the model can "warm-start" the process by biasing pixels with high redo strength toward a noised version of the reference image rather than starting from pure noise.
Datasets
The researchers evaluated SoftPaint across several established benchmarks to test both image and video capabilities:
- FlowEdit: A benchmark for image editing featuring diverse object-centric masks and paired prompts.
- DAVIS-Edit: A video editing benchmark used to test temporal consistency and edit quality on models like CogVideoX-5B and Wan2.2.
- ImageNet: Used specifically for a binary-mask inpainting comparison to isolate the performance of the DDL sampler against traditional methods like RePaint.
Key Insights and Ideas
- The "Softness" Logic: The authors' key insight is that a truly soft constraint should allow generated pixels to deviate from the reference in a controlled, probabilistic manner. By imagining the reference image is "softened" by Gaussian noise before being diffused, they derived a mathematically principled way to blend the reference and the generative prior.
- Pareto Dominance: In generative modeling, there is always a trade-off between "edit strength" (how much the image changes to match the prompt) and "preservation" (how much it looks like the original). SoftPaint consistently achieves a better Pareto frontier than previous methods like Differential Diffusion (DD), meaning it provides higher quality at the same level of edit strength.
- Gradient-Free Efficiency: Because SoftPaint doesn't rely on backpropagation (gradients), it uses the same peak GPU memory as standard inference. This makes it accessible for users on consumer-grade hardware.
Key Results
- Controllability: On the FlowEdit benchmark, SoftPaint showed a nearly linear relationship between the mask value ($r$) and the realized edit strength (measured by CLIP-Text scores). Competing methods were either too insensitive at low values or "overshot" the edit too quickly.
- Image Quality: At matched edit strengths, SoftPaint achieved significantly higher PSNR (image fidelity) and lower LPIPS (perceptual distance) compared to Differential Diffusion.
- Video Consistency: In video tasks, SoftPaint demonstrated a "coarse-to-fine" progression. For example, in a "Model Train → Wooden Train" edit, low $r$ values changed only the texture, while high $r$ values transformed the entire geometry, all while maintaining temporal smoothness that baseline methods lacked.
Limitations and Future Work
- Inference Speed: The primary trade-off is time. Because SoftPaint runs an "inner loop" of Langevin iterations at each diffusion step, it is roughly 2x to 5x slower than standard sampling. The authors note this could be a bottleneck for real-time interactive applications.
- Future Directions: The authors suggest that further research into optimizing the number of inner-loop evaluations or finding more efficient solvers could mitigate the speed penalty. Additionally, exploring how this method scales to even larger multi-modal models remains an open question.
Summary updated