LanPaint
High quality training free inpaint for every stable diffusion model. Supports ComfyUI
Package profile
- Status
- Verified
- Publisher
- @scraed
- Source
- GitHub
- Stars
- 1.4K
README
LanPaint: Universal Inpainting Sampler with "Think Mode"
TMLR PDF Python Benchmark ComfyUI Extension Hugging Face Blog GitHub stars Discord
Universally applicable inpainting ability for every model. LanPaint sampler lets the model "think" through multiple iterations before denoising, enabling you to invest more computation time for superior inpainting quality.
What LanPaint Enables
- Training-free image inpainting
- Outpainting and generative fill
- Mask-constrained local image editing
- Object / region replacement with text guidance
- Character-consistent local generation
- Video inpainting and local video editing
- Video + audio masked generation
Research & Benchmark
LanPaint is a training-free partial conditional sampler that enables mask-constrained inpainting and local editing with pretrained diffusion and rectified-flow models, without fine-tuning or backpropagation.
- 📄 Paper: LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling — TMLR 2025
- 🧩 ComfyUI Implementation: This repository
- 🐍 Diffusers Implementation: LanPaint-Diffusers by @charrywhite
- 🧪 Benchmark & Reproduction: LanPaintBench
- 🌐 Project Website: LanPaint Page
Citation
@article{
zheng2025lanpaint,
title={LanPaint: Training-Free Diffusion Inpainting with Asymptotically Exact and Fast Conditional Sampling},
author={Candi Zheng and Yuan Lan and Yang Wang},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2025},
url={https://openreview.net/forum?id=JPC8JyOUSW}
}
🎉 NEW 2026: Join our discord!
Join our Discord to share experiences, discuss features, and explore future development.
v2.1.0 significantly accelerates LanPaint with a new schedule mechanism and fixes MiniMax H3 support on the latest ComfyUI.
If your inpainting results have wierd (glowing / broken) mask boundary, check this issue.
🎨 NEW: LanPaint now supports Qwen-Image 2.1 - transparency, and masked image editing!
Qwen 2.1 image edit: the canvas, the mask, the second reference and the result
Qwen 2.1's image edit model now works under a LanPaint mask: tell it what to change, paint over the part you want it to touch, and only that part changes. Hand it a second picture to borrow from if you want one. Check our latest Qwen Image 2.1 Image Edit Example.
Qwen 2.1 before / masked / after
And if your picture carries transparency, it gets inpainted too - the rebuilt part comes back with a new outline, not just new colours. Check our latest [Qwen Image 2.1 Example](#example-qwe
Nodes in this pack
13 nodes
Nodes in this pack
13 nodes- LanPaint_AVDecode
- LanPaint_AVEncode
- LanPaint_ImageDecode
- LanPaint_ImageEncode
- LanPaint_KSampler
- LanPaint_KSamplerAdvanced
- LanPaint_MaskBlend
- LanPaint_MiniMaxAudioDecode
- LanPaint_MiniMaxAudioEncode
- LanPaint_SamplerCustom
- LanPaint_SamplerCustomAdvanced
- LanPaint_UpSale_LatentNoiseMask
- LanPaint_VideoMaskEditor
Related resources
5 connections
Related resources
5 connectionsSources
3 sources
Sources
3 sourcesVerified Oct 4
Verified Oct 4
Source excerpts
1 excerpt
Source excerpts
1 excerptSource context: Repo scraed/LanPaint
