LanPaint
LanPaint is a training-free inpainting extension for ComfyUI that works with any Stable Diffusion model. It uses an iterative "think mode" to improve inpainting quality without requiring model retraining, supporting image, video, and outpainting tasks.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | scraed/LanPaint |
| Owner | scraed |
| Primary language | Python |
| License | GPL-3.0 — OSI-approved |
| Stars | 1.3k |
| Forks | 44 |
| Open issues | 11 |
| Latest release | 1.5.5 (2026-06-27) |
| Last updated | 2026-06-28 |
| Source | https://github.com/scraed/LanPaint |
What LanPaint is
LanPaint implements an asymptotically exact conditional sampling algorithm for diffusion-based inpainting. It operates as a ComfyUI sampler node compatible with models including Flux, SDXL, SD 3.5, Qwen, Wan 2.2, and Ideogram4, with optional ControlNet support and Z-image/latent-space inpainting modes.
Get the LanPaint source
Clone the repository and explore it locally.
git clone https://github.com/scraed/LanPaint.gitcd LanPaint# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires ComfyUI environment setup; ensure compatible Python version and CUDA/ROCm for target hardware.
- Tuning is model-dependent; the README references an "Advanced Tuning Guide" and multiple examples across different models (Flux, SDXL, Qwen, Wan 2.2) indicating configuration varies.
- Mask quality and format matter; examples show mask preparation as a separate step; validate mask pipeline in your workflow.
- Think steps (iteration count) tune quality vs. latency trade-off; v1.5.0 fixed hidden bugs affecting performance, so update to latest release.
- VRAM consumption for video inpainting scales with frame count; benchmarks or resource docs not provided in excerpt, requires empirical testing.
When to avoid it — and what to weigh
- Standalone Python/Diffusers integration is a requirement — LanPaint is purpose-built as a ComfyUI extension. A separate Diffusers port exists (LanPaint-Diffusers) but is maintained externally; the core repo does not support direct Diffusers integration.
- Need for commercial licensing with explicit permission — Licensed under GPL-3.0, which requires derivative works and distributions to remain open-source. Commercial use of modified versions requires legal review; selling closed-source products based on LanPaint is not permissible without GPL compliance.
- Inference speed is the primary concern — The "think mode" intentionally adds iterations before denoising to improve quality at the cost of compute time. If latency or inference cost is critical, the overhead may be prohibitive.
- Models with aggressive distillation or extreme quantization — README warns of degraded performance on distillation models; effectiveness on heavily quantized or distilled variants is not documented.
License & commercial use
Licensed under GPL-3.0 (GNU General Public License v3.0). This is a copyleft license requiring that any distribution or derivative work remain open-source under the same license terms.
GPL-3.0 is not a permissive license. Commercial use of unmodified LanPaint as-is in a ComfyUI workflow may be acceptable, but distribution of modified versions, integration into proprietary products, or closed-source derivatives is not permitted without relicensing or proprietary exception. Legal review is mandatory before commercial deployment. No commercial support or licensing terms are stated in the data provided.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
No explicit security audit, vulnerability history, or threat model provided. As a Python-based node extension executed within ComfyUI, it inherits ComfyUI's execution context. Mask and image processing use standard library operations (likely PIL, NumPy); no novel cryptographic or authentication mechanisms. Standard code review and dependency audit recommended before deployment in sensitive environments. No known CVEs referenced in the data.
Alternatives to consider
Diffusers library with manual inpainting pipeline
Native Python integration without ComfyUI dependency; broader model support but requires custom script development and lacks UI convenience.
GIMP/Photoshop content-aware fill or AI plugins
User-friendly GUI for casual inpainting; not model-agnostic, limited to bundled models, and no iterative refinement control.
Hugging Face Gradio-based inpainting demos
Lightweight, no local setup, web-based; but limited customization, no ComfyUI integration, and model access constrained by host.
Build on LanPaint with DEV.co software developers
LanPaint is production-ready for ComfyUI-based content generation pipelines. Verify GPL-3.0 compliance with your legal team, test with your target models, and plan for inference overhead. Contact us to discuss integration architecture and deployment strategy.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
LanPaint FAQ
Does LanPaint require training or fine-tuning my models?
Can I use LanPaint commercially?
What is 'think mode' and does it slow down inference?
Is there Python/Diffusers support outside ComfyUI?
Software developers & web developers for hire
Need help beyond evaluating LanPaint? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and ai frameworks integrations — and maintain them long-term.
Ready to integrate LanPaint into your workflow?
LanPaint is production-ready for ComfyUI-based content generation pipelines. Verify GPL-3.0 compliance with your legal team, test with your target models, and plan for inference overhead. Contact us to discuss integration architecture and deployment strategy.