scraed/LanPaint

High quality training free inpaint for every stable diffusion model. Supports ComfyUI

What it solves

LanPaint provides a universal, training-free inpainting and outpainting solution for diffusion models. It eliminates the need for model-specific inpainting training or complex blending workarounds, allowing users to generate high-quality, seamless new content within masked areas of images and videos using their existing models.

How it works

LanPaint introduces a specialized sampler that implements a "Think Mode." This allows the model to perform multiple iterations of "thinking" before the final denoising process. By investing more computation time through these iterations, the sampler achieves asymptotically exact and fast conditional sampling, which results in superior inpainting quality without requiring the model to be retrained.

Who it’s for

This tool is primarily designed for AI artists and developers using ComfyUI who want to perform high-fidelity inpainting and outpainting across a wide variety of models (such as Flux, SDXL, Wan 2.2, and others) without needing to train custom inpainting models.

Highlights

  • Universal Compatibility: Works with a vast array of models including Ideogram4, Krea2, Z-image, Hunyuan, Wan 2.2, Qwen, Anima, SD 3.5, Flux, and SDXL.
  • Training-Free: Operates out of the box with existing models without any additional training.
  • Video Support: Capable of video inpainting and outpainting (specifically with Wan 2.2) while maintaining temporal consistency.
  • Think Mode: A unique sampling approach that lets users trade computation time for higher quality results.
  • Flexible Masking: Supports any mask shape, size, or position for both inpainting and outpainting.