← 开源
scraed

LanPaint

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

ApplicationsContent creationPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.46k
Star
54
Fork
+12
本周
8
贡献者
创建于 2025-02-27 · 更新于 2026-10-15 · 今日第 10274 名
主要开发者

scraed/LanPaint 排名第 10,274,有 1,458 个星标。

同类别比较

scraed/LanPaint 排名第 10,274,此处有 8 个同类条目;hotovo/aider-desk 排名第 10,277。

同类别比较
名称排名指标
gabotechs/MusicGPT10,261
语言:
Rust
星标数:
1,462
分叉数:
170
简介:
Generate music based on natural language prompts using LLMs running locally
buaacyw/GaussianEditor10,264
语言:
C++
星标数:
1,461
分叉数:
75
简介:
[CVPR 2024] GaussianEditor: Swift and Controllable 3D Editing with Gaussian Splatting
datitran/face2face-demo10,265
语言:
Python
星标数:
1,461
分叉数:
410
简介:
pix2pix demo that learns from facial landmarks and translates this into a face
langchain-ai/openwork10,270
语言:
TypeScript
星标数:
1,459
分叉数:
194
hotovo/aider-desk10,277
语言:
TypeScript
星标数:
1,457
分叉数:
129
简介:
Platform for AI-powered software engineers
11cafe/comfyui-workspace-manager10,281
语言:
TypeScript
星标数:
1,456
分叉数:
79
简介:
A ComfyUI workflows and models management extension to organize and manage all your workflows, models in one place. Seamlessly switch between workflows, as well as import, export workflows, reuse subworkflows, install models, browse your models in a single workspace
InternScience/InternAgent10,285
语言:
Python
星标数:
1,454
分叉数:
132
简介:
InternAgent-1.5: A Unified Agentic Framework for Long-Horizon Autonomous Scientific Discovery
jkbrzt/cointrol10,286
语言:
Python
星标数:
1,453
分叉数:
276
简介:
฿ Bitcoin trading bot with a real-time dashboard for Bitstamp.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Applications
子类别Content creation
关键词Image production, Video production
星标数1,458
分叉数54
贡献者8
创建日期2025-02-27
更新日期2026-10-15
1 天星标数0
7 天星标数12
排名10,274
上次排名3,171
排名变化-7,103
7 天星标排名3,658
上次 7 天星标排名3,236
7 天星标排名变化-422
总星标排名8,282
上次总星标排名8,265
总星标排名变化-17
国家China
README 摘录

Here are some user-created tutorials: Ai绘画进阶148-三大王炸! LanPaint进阶(二),人物一致性,多视角实验性测试,新参数讲解,工作流分享-T8 Comfyui教程 重绘和三视图角色一致性解决新方案! LanPaint节点尝试 ComfyUI: HiDream with Perturbation Upscale, LanPaint Inpainting (Workflow Tutorial) ComfyUI必备

LanPaint插件超详细使用教程 Submit a PR to add your tutorial/video here, or open an Issue with details!

常见问题

记录了多少星标和分叉?

scraed/LanPaint 有 1,458 个星标和 54 个分叉。

仓库排名是多少?

scraed/LanPaint 排名第 10,274。

记录的语言和类别是什么?

scraed/LanPaint 有 1,458 个星标,语言为 Python,类别为 Applications。

哪个仓库排名最接近?

scraed/LanPaint 与 hotovo/aider-desk 比较,后者排名第 10,277,有 1,457 个星标。

README

LanPaint: Universal Inpainting Sampler with "Think Mode"

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.

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'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.

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.

🎬 NEW: LanPaint now supports MiniMax H3 video + audio inpainting!

Masked Input (paint in the editor) Mask (visible overlay) Inpainted Result

Check our latest MiniMax H3 Example: paint per-frame video masks and audio intervals in one editor, inpaint video + audio in a single pass, and export the masks into the video file itself.

🎬 NEW: LanPaint now supports inpainting and outpainting based on Z-Image!

Original Masked Inpainted

🎬 NEW: LanPaint now supports Z-Image-Base too!

Original Masked Inpainted

🎬 NEW: LanPaint now supports video inpainting and outpainting based on Wan 2.2!

Original Video Mask (edit T-shirt text) Inpainted Result

Video Inpainting Example: 81 frames with temporal consistency

🎬 NEW: LanPaint now supports Anima!

Original Masked Inpainted

🎬 NEW: LanPaint now supports Ideogram4!

Original Masked Inpainted

🎬 NEW: LanPaint now supports Krea2!

Original Masked Inpainted

Check our latest Krea2 Example, Ideogram4 Example, Anima Example, Wan 2.2 Video Examples, Wan 2.2 Image Examples, and Qwen Image Edit 2509 support.

Table of Contents

Features

  • Universal Compatibility – Works instantly with almost any model (Ideogram4, Krea2, Z-image, Z-image-base, Hunyuan, Wan 2.2, Qwen Image 2.1/Image/Edit, Anima, HiDream, SD 3.5, Flux-series, SDXL, SD 1.5 or custom LoRAs) and ControlNet.
  • No Training Needed – Works out of the box with your existing model.
  • Easy to Use – Same workflow as standard ComfyUI KSampler.
  • Flexible Masking – Supports any mask shape, size, or position for inpainting/outpainting.
  • No Workarounds – Generates 100% new content (no blending or smoothing) without relying on partial denoising.
  • Beyond Inpainting – You can even use it as a simple way to generate consistent characters.
  • Video Mask Editor – Paint per-frame inpainting masks directly on a video inside ComfyUI (LanPaint_VideoMaskEditor): pick the video file, open the editor, paint masks on keyframes, and the masks in between are interpolated automatically with a live preview. Mask = 1 regenerates, 0 keeps.
  • MiniMax H3 Video + Audio Inpainting – Inpaint video and audio in one pass: paint per-frame video masks and audio intervals in the same editor, encode both streams into one nested latent (LanPaint_AVEncode), sample, then LanPaint_AVDecode merges the inpainted video/audio back into the original with a mask-blended boundary, preserving the source fps and bit depth.
  • Masks Live in the Video – The editor can export the painted masks into the video file itself (mp4 metadata, via a new "masked" copy - the original is never modified). Share that single mp4 and the recipient gets the masks back automatically when they load it.

Warning: LanPaint has degraded performance on distillation models, such as Flux.dev, due to a similar issue with LORA training. Please use low flux guidance (1.0-2.0) to mitigate this issue.

Quickstart

  1. Install ComfyUI: Follow the official ComfyUI installation guide to set up ComfyUI on your system. Or ensure your ComfyUI version > 0.3.11.
  2. Install ComfyUI-Manager: Add the ComfyUI-Manager for easy extension management.
  3. Install LanPaint Nodes:
    • Via ComfyUI-Manager: Search for "LanPaint" in the manager and install it directly.
    • Manually: Click "Install via Git URL" in ComfyUI-Manager and input the GitHub repository link:
      https://github.com/scraed/LanPaint.git
      
      Alternatively, clone this repository into the ComfyUI/custom_nodes folder.
  4. Restart ComfyUI: Restart ComfyUI to load the LanPaint nodes.

Once installed, you'll find the LanPaint nodes under the "sampling" category in ComfyUI. Use them just like the default KSampler for high-quality inpainting!

How to Use Examples:

  1. Navigate to the example folder (i.e example_1), download all pictures.
  2. Drag InPainted_Drag_Me_to_ComfyUI.png into ComfyUI to load the workflow.
  3. Download the required model (i.e clicking Model Used in This Example).
  4. Load the model in ComfyUI.
  5. Upload Masked_Load_Me_in_Loader.png to the "Load image" node in the "Mask image for inpainting" group (second from left), or the Prepare Image node.
  6. Queue the task, you will get inpainted results from LanPaint. Some example also gives you inpainted results from the following methods for comparison:

Video Examples

LanPaint now supports video inpainting with Wan 2.2, enabling you to seamlessly inpaint masked regions across video frames while maintaining temporal consistency.

Note: LanPaint supports video inpainting for longer sequences (e.g., 81 frames), but processing time increases significantly (please check the Resource Consumption section for details) and performance may become unstable. For optimal results and stability, we recommend limiting video inpainting to 40 frames or fewer.

Wan 2.2 Video Inpainting

Example: Wan2.2 t2v 14B, 480p video (11:6), 40 frames, LanPaint K Sampler, 2 steps of thinking

Original Video Mask (Add a white hat) Inpainted Result

View Workflow & Masks

You need to follow the ComfyUI version of Wan2.2 T2V workflow to download and install the T2V model.

Wan 2.2 5B Video Inpainting

Similar to Wan 2.2 14B with slightly different workflow. View Workflow & Masks

Wan 2.2 Video Outpainting

Extend your videos beyond their original boundaries with LanPaint's video outpainting capability based on Wan 2.2. This feature allows you to expand the canvas of your videos while maintaining coherent motion and context.

Example: Wan2.2 t2v 14B, 480p video (1:1 outpaint to 11:6), 40 frames, LanPaint K Sampler, 2 steps of thinking

Original Video Mask (Expand to 880x480) Outpainted Result

View Workflow & Masks

You need to follow the ComfyUI version of Wan2.2 T2V workflow to download and install the T2V model.

MiniMax H3 Video + Audio Inpainting (AV pipeline)

LanPaint's AV pipeline inpaints video and audio together with the MiniMax H3 model. Paint both masks in one editor session, run a single sampler pass on the nested AV latent, and get back a merged video at the original fps and bit depth.

Example: MiniMax H3, 864x480, 124 frames, LanPaint Sampler Custom (Advanced)

Masked Input (paint in the editor) Mask (visible overlay) Inpainted Result

View Workflow & Masks · Workflow JSON

How it works:

  1. LanPaint_VideoMaskEditor – pick the video, open the editor, paint per-frame video masks on keyframes (SDF-interpolated in between) and drag audio intervals on the waveform. Mask = 1 regenerates, 0 keeps.
  2. LanPaint_AVEncode – encodes the video frames and the audio track into one nested latent with the masks attached.
  3. Run the sampler as usual (the audio stream runs on its own shifted sigma schedule).
  4. LanPaint_AVDecode – decodes the nested latent, merges the inpainted video with the original (mask-blended boundary) and the inpainted audio inside the masked intervals (with a short crossfade), and writes the result at the original fps and bit depth.

Export masks into the video: the editor's Export mask video button remuxes a new _masked.mp4 copy with the masks embedded in the file metadata (the original file is never modified). Open that file in the editor later - or share it with someone - and the masks are restored automatically.

Download the models from MiniMax H3 on Hugging Face and follow the ComfyUI MiniMax H3 docs.

Resource Consumption

Processing Mode

Resolution

Frames Processed

VRAM Required

Total Runtime (20 steps)

Inpainting

880×480 (11:6)

40 frames

39.8 GB

05:37 min

Inpainting

480×480 (1:1)

40 frames

38.0 GB

05:35 min

Outpainting

880×480 (11:6)

40 frames

40.2 GB

05:36 min

Inpainting

880×480 (11:6)

81 frames

43.3 GB

16:23 min

Inpainting

480×480 (1:1)

81 frames

39.8 GB

14:25 min

Outpainting

880×480 (11:6)

81 frames

42.6 GB

13:46 min

Test Platform: All tests were conducted on an NVIDIA RTX Pro 6000.

Model Used: wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors and wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors.

Processing Steps: 20 sampling steps x 2 (LanPaint steps of thinking).

Note: Vram is required by the model, not LanPaint. To further reduce VRAM requirements, we recommend generating less frames and loading CLIP on CPU.

Image Examples

Example Anima: InPaint(LanPaint K Sampler, 5 steps of thinking)

We are excited to announce that LanPaint now supports inpainting with the Anima text-to-image model.

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

Model Used in This Example

Example Ideogram4: InPaint(LanPaint Custom Sampler Advanced, 5 steps of thinking)

We are excited to announce that LanPaint now supports inpainting with the Ideogram4 text-to-image model.

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

Model Used in This Example

Example Hunyuan T2I: InPaint(LanPaint K Sampler, 5 steps of thinking)

We are excited to announce that LanPaint now supports inpainting with Hunyuan text to image generation.

View Workflow & Masks

You need to follow the ComfyUI version of Hunyuan workflow to download and install the model.

Example Wan2.2: InPaint(LanPaint K Sampler, 5 steps of thinking)

We are excited to announce that LanPaint now supports Wan2.2 text to image generation with Wan2.2 T2V model.


View Workflow & Masks

You need to follow the ComfyUI version of Wan2.2 T2V workflow to download and install the T2V model.

Example Z-image: InPaint(LanPaint K Sampler, 5 steps of thinking)

LanPaint also supports inpainting with the Z-image text-to-image model.

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

View Z-image Outpainting (Original / Masked / Outpainted)

Original Masked Outpainted

View Outpaint Workflow & Masks

You can download the Z-image model for ComfyUI from Z-image.

Example Z-image-base: InPaint(LanPaint K Sampler, 3 steps of thinking)

LanPaint also supports inpainting with the Z-image-base model.

Warning (stability): Z-image-base can easily diverge with LanPaint. Start with small LanPaint_StepSize and fewer thinking iterations (lower LanPaint_NumSteps) and increase gradually only if stable.

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

Workflow template (JSON): Z_image_base_Inpaint.json

Example Krea2: InPaint(LanPaint K Sampler, 3 steps of thinking)

We are excited to announce that LanPaint now supports inpainting with the Krea2 Turbo text-to-image model.

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

Model Used in This Example

Example Wan2.2: Partial InPaint(LanPaint K Sampler, 5 steps of thinking)

Sometimes we don't want to inpaint completely new content, but rather let the inpainted image reference the original image. One option to achieve this is to inpaint with an edit model like Qwen Image Edit. Another option is to perform a partial inpaint: allowing the diffusion process to start at some middle steps rather than from 0.


View Workflow & Masks

You need to follow the ComfyUI version of Wan2.2 T2V workflow to download and install the T2V model.

Example Qwen Edit 2509: InPaint

Check our latest updated Mased Qwen Edit Workflow for Qwen Image Edit 2509. Download the model at Qwen Image Edit 2509 Comfy. This workflow also supports Qwen Image Edit 2511.

Example Qwen Edit 2508: InPaint

Check Mased Qwen Edit Workflow. You need to follow the ComfyUI version of Qwen Image Edit workflow to download and install the model.

Example Qwen Image 2.1 Image Edit: Masked InPaint(LanPaint K Sampler, 5 steps of thinking)

Qwen-Image 2.1's image edit model now works under a LanPaint mask: write what you want changed, paint over the part it should touch, and only that part changes - everything else, transparency included, comes back exactly as it was. In this example a second picture supplies the material for the earcups, and the headband and stitching stay as they are. Workflow and images are in examples/Example_32; drag InPainted_Drag_Me_to_ComfyUI.png into ComfyUI to load it. Use your own pictures with the official Qwen Image 2.1 Image Edit template.

View Workflow & Masks · Workflow JSON

Example Qwen Image 2.1: InPaint with Transparency(LanPaint K Sampler, 5 steps of thinking)

Qwen-Image 2.1 inpaints a picture's transparency along with its pixels, so the rebuilt part can come back with a new outline instead of merely new colours - here the boot's sole is replaced and the silhouette grows with it. Workflow and images are in examples/Example_31; drag InPainted_Drag_Me_to_ComfyUI.png into ComfyUI to load it.

View Workflow & Masks · Workflow JSON

Example Qwen Image: InPaint(LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks

You need to follow the ComfyUI version of Qwen Image workflow to download and install the model.

The following examples utilize a random seed of 0 to generate a batch of 4 images for variance demonstration and fair comparison. (Note: Generating 4 images may exceed your GPU memory; please adjust the batch size as necessary.)

Also check Qwen Inpaint Workflow and Qwen Outpaint Workflow. You need to follow the ComfyUI version of Qwen Image workflow to download and install the model.

Example HiDream: InPaint (LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks

You need to follow the ComfyUI version of HiDream workflow to download and install the model.

Example HiDream: OutPaint(LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks

You need to follow the ComfyUI version of HiDream workflow to download and install the model. Thanks Amazon90 for providing this example.

Example SD 3.5: InPaint(LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks

You need to follow the ComfyUI version of SD 3.5 workflow to download and install the model.

Example Flux.2.Dev: InPaint(LanPaint K Sampler, 5 steps of thinking)

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

Model Used in This Example

(Note: Prompt First mode is disabled on Flux.2.Dev. As it does not use CFG guidance.)

Example Flux 2 klein: InPaint(LanPaint K Sampler, 2 steps of thinking)

View Original / Masked / Inpainted Comparison

Original Masked Inpainted

View Workflow & Masks

Model Used in This Example. If you have quality problem on Comfy 0.11 and 0.12, check this issue.

Example Flux: InPaint(LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks Model Used in This Example (Note: Prompt First mode is disabled on Flux. As it does not use CFG guidance.)

Example SDXL 0: Character Consistency (Side View Generation) (LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks Model Used in This Example

(Tricks 1: You can emphasize the character by copy it's image multiple times with Photoshop. Here I have made one extra copy.)

(Tricks 2: Use prompts like multiple views, multiple angles, clone, turnaround. Use LanPaint's Prompt first mode (does not support Flux))

(Tricks 3: Remeber LanPaint can in-paint: Mask non-consistent regions and try again!)

Example SDXL 1: Basket to Basket Ball (LanPaint K Sampler, 2 steps of thinking).


View Workflow & Masks Model Used in This Example

Example SDXL 2: White Shirt to Blue Shirt (LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks Model Used in This Example

Example SDXL 3: Smile to Sad (LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks Model Used in This Example

Example SDXL 4: Damage Restoration (LanPaint K Sampler, 5 steps of thinking)


View Workflow & Masks Model Used in This Example

Example SDXL 5: Huge Damage Restoration (LanPaint K Sampler, 20 steps of thinking)


View Workflow & Masks Model Used in This Example

Check more for use cases like inpaint on fine tuned models and face swapping, thanks to Amazon90.

Usage

Workflow Setup
Same as default ComfyUI KSampler - simply replace with LanPaint KSampler nodes. The inpainting workflow is the same as the SetLatentNoiseMask inpainting workflow.

Note

  • LanPaint requires binary masks (values of 0 or 1) without opacity or smoothing. To ensure compatibility, set the mask's opacity and hardness to maximum in your mask editor. During inpainting, any mask with smoothing or gradients will automatically be converted to a binary mask.
  • LanPaint relies heavily on your text prompts to guide inpainting - explicitly describe the content you want generated in the masked area. If results show artifacts or mismatched elements, counteract them with targeted negative prompts.

Basic Sampler

  • LanPaint KSampler: The most basic and easy to use sampler for inpainting.
  • LanPaint KSampler (Advanced): Full control of all parameters.

LanPaint KSampler

Simplified interface with recommended defaults:

  • Steps: 20 - 50. More steps will give more "thinking" and better results.
  • LanPaint NumSteps: The turns of thinking before denoising. Recommend 5 for most of tasks ( which means 5 times slower than sampling without thinking). Use 10 for more challenging tasks.
  • LanPaint Prompt mode: Image First mode and Prompt First mode. Image First mode focuses on the image, inpaint based on image context (maybe ignore prompt), while Prompt First mode focuses more on the prompt. Use Prompt First mode for tasks like character consistency. (Technically, it Prompt First mode change CFG scale to negative value in the BIG score to emphasis prompt, which will costs image quality.)

LanPaint KSampler (Advanced)

Full parameter control: Key Parameters

Parameter Range Description
Steps 0-100 Total steps of diffusion sampling. Higher means better inpainting. Recommend 20-50.
LanPaint_NumSteps 0-20 Reasoning iterations per denoising step ("thinking depth"). Easy task: 2-5. Hard task: 5-10
LanPaint_Lambda 0.1-50 Content alignment strength (higher = stricter). Recommend 4.0 - 10.0
LanPaint_StepSize 0.1-1.0 The StepSize of each thinking step. Recommend 0.1-0.5.
LanPaint_Beta 0.1-2.0 The StepSize ratio between masked / unmasked region. Small value can compensate high lambda values. Recommend 1.0
LanPaint_Friction 0.0-100.0 The friction of Langevin dynamics. Higher means more slow but stable, lower means fast but unstable. Recommend 10.0 - 20.0
LanPaint_EarlyStop 0-10 Stop LanPaint iteration before the final sampling step. Helps to remove artifacts in some cases. Recommend 1-5
LanPaint_PromptMode Image First / Prompt First Image First mode focuses on the image context, maybe ignore prompt. Prompt First mode focuses more on the prompt.

For detailed descriptions of each parameter, simply hover your mouse over the corresponding input field to view tooltips with additional information.

LanPaint Mask Blend

This node blends the original image with the inpainted image based on the mask. It is useful if you want the unmasked region to match the original image pixel perfectly.

LanPaint KSampler (Advanced) Tuning Guide

For challenging inpainting tasks:

1️⃣ Boost Quality Increase total number of sampling steps (very important!), LanPaint_NumSteps (thinking iterations) or LanPaint_Lambda if the inpainted result does not meet your expectations.

2️⃣ Boost Speed Decrease LanPaint_NumSteps to accelerate generation! If you want better results but still need fewer steps, consider: - Increasing LanPaint_StepSize to speed up the thinking process. - Decreasing LanPaint_Friction to make the Langevin dynamics converges more faster.

3️⃣ Fix Unstability:
If you find the results have wired texture, try

  • Reduce LanPaint_Friction to make the Langevin dynamics more stable.
  • Reduce LanPaint_StepSize to use smaller step size.
  • Reduce LanPaint_Beta if you are using a high lambda value.

⚠️ Notes:

  • For effective tuning, fix the seed and adjust parameters incrementally while observing the results. This helps isolate the impact of each setting. Better to do it with a batche of images to avoid overfitting on a single image.

Community Showcase

Discover how the community is using LanPaint! Here are some user-created tutorials:

Submit a PR to add your tutorial/video here, or open an Issue with details!

FAQ

Working togather with crop&stitch

Updates

  • 2026/09/28
    • Add Qwen-Image 2.1 image edit support: masked, instruction-driven editing (Example_32).
    • Add Qwen-Image 2.1 inpainting support with LanPaint KSampler (Example_31).
    • Inpainting a picture that carries transparency now works end to end: the 2.1 VAE is 4-in/4-out, so the alpha travels through the latent and is edited alongside the pixels. Keep the inpainting mask in its own greyscale file, since 2.1's alpha channel means image transparency.
    • LanPaint_ImageDecode now matches the decoded channel count to the source image, so an RGBA source comes back RGBA and an RGB source still comes back RGB.
  • 2026/08/12
    • v2.1.0: Significantly accelerated LanPaint using a new schedule mechanism.
    • Fix bugs for MiniMax H3 on the latest ComfyUI.
  • 2026/08/09
    • Add MiniMax H3 video + audio inpainting support (Example_29): paint per-frame video masks and audio intervals in one editor session, encode both streams into a nested AV latent, sample once, and decode back with the source fps and bit depth preserved.
    • The mask editor can export the masks into the video itself (mp4 metadata) - share a single video file and the masks travel with it.
  • 2026/06/27
    • Add Krea2 inpainting support with LanPaint KSampler (Example_28).
    • Add Ideogram4 inpainting support with LanPaint Custom Sampler Advanced (Example_27).
  • 2026/05/20
    • Add Anima inpainting and outpainting support (Example_26).
  • 2026/03/02
    • v1.5.0: Fixed a hidden bug that hurt performance and caused image blur (especially on z-image-base), and improved overall LanPaint performance on other models too.
  • 2026/01/30
    • Add Z-image-base documentation and Example_25 workflow images.
  • 2025/08/08
    • Add Qwen image support
  • 2025/06/21
    • Update the algorithm with enhanced stability and outpaint performance.
    • Add outpaint example
    • Supports Sampler Custom (Thanks to MINENEMA)
  • 2025/06/04
    • Add more sampler support.
    • Add early stopping to advanced sampler.
  • 2025/05/28
    • Major update on the Langevin solver. It is now much faster and more stable.
    • Greatly simplified the parameters for advanced sampler.
    • Fix performance issue on Flux and SD 3.5
  • 2025/04/16
    • Added Primary HiDream support
  • 2025/03/22
    • Added Primary Flux support
    • Added Tease Mode
  • 2025/03/10
    • LanPaint has received a major update! All examples now use the LanPaint K Sampler, offering a simplified interface with enhanced performance and stability.
  • 2025/03/06:

ToDo

  • Try Implement Detailer
  • Provide inference code on without GUI. Check our local Python benchmark code LanPaintBench.

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},
note={}
}
排名相邻
同类项目