How to Do Soft Inpainting in ComfyUI

Differential diffusion, also known as soft inpainting, is a much-improved way to approach image editing. This technique offers a significant improvement over traditional inpainting methods by applying changes on a per-pixel basis, resulting in seamless and natural-looking edits.
In addition to making for better final results and fewer retries to get the image to look "right," soft inpainting works well with standard generational checkpoints – while still being compatible with inpainting checkpoints.
Getting this to work in ComfyUI is straightforward:
- Load your image and create a mask using the Mask Editor.
- Add these nodes:
Gaussian Blur Mask
Inpaint Model Conditioning
Differential Diffusion
- Connect the nodes:
- Pass the mask through the Gaussian Blur Mask
- Route your model through Differential Diffusion
- Feed prompts, mask, and other parameters into Inpaint Model Conditioning
- Adjust the Gaussian Blur Mask settings:
- Kernel size: Controls the brush size
- Sigma: Determines the softness of the gradient
- Fine-tune your KSampler:
- Experiment with denoise values between 0.6 and 0.8 for optimal results. A denoise value of 1 will provide the most creative results.
Pro Tip: Be mindful of the mask's softness; excessive blurring may affect surrounding areas unintentionally.
Differential diffusion opens up new possibilities for subtle yet powerful image manipulations. Whether you're adding objects, changing features, or blending elements, this technique provides a level of control and naturalism previously unattainable with standard inpainting methods.
Experiment with different mask shapes, blur intensities, and prompts for more creative results.
Join Our Creative Community
Stay updated with the latest tutorials and exclusive content on AI applications and tools.
