charrywhite commited on
Commit
b233e3d
·
verified ·
1 Parent(s): b921b5d

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +15 -1
  2. model-card.md +114 -0
README.md CHANGED
@@ -1,3 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div align="center">
2
 
3
  # LanPaint: Universal Inpainting Sampler with "Think Mode"
@@ -5,7 +19,7 @@
5
  [![Python Benchmark](https://img.shields.io/badge/🐍-Python_Benchmark-3776AB?logo=python)](https://github.com/scraed/LanPaintBench)
6
  [![ComfyUI Extension](https://img.shields.io/badge/ComfyUI-Extension-7B5DFF)](https://github.com/comfyanonymous/ComfyUI)
7
  [![Blog](https://img.shields.io/badge/📝-Blog-9cf)](https://scraed.github.io/scraedBlog/)
8
- [![GitHub stars](https://img.shields.io/github/stars/scraed/LanPaint)](https://github.com/scraed/LanPaint/stargazers)
9
  </div>
10
 
11
  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.
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - comfyui
6
+ - inpainting
7
+ - stable-diffusion
8
+ - image-generation
9
+ - computer-vision
10
+ license: gpl-3.0
11
+ library_name: comfyui-extension
12
+ pipeline_tag: image-inpainting
13
+ ---
14
+
15
  <div align="center">
16
 
17
  # LanPaint: Universal Inpainting Sampler with "Think Mode"
 
19
  [![Python Benchmark](https://img.shields.io/badge/🐍-Python_Benchmark-3776AB?logo=python)](https://github.com/scraed/LanPaintBench)
20
  [![ComfyUI Extension](https://img.shields.io/badge/ComfyUI-Extension-7B5DFF)](https://github.com/comfyanonymous/ComfyUI)
21
  [![Blog](https://img.shields.io/badge/📝-Blog-9cf)](https://scraed.github.io/scraedBlog/)
22
+ [![GitHub stars](https://img.shields.io/badge/GitHub-stars-yellow)](https://github.com/scraed/LanPaint/stargazers)
23
  </div>
24
 
25
  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.
model-card.md ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - comfyui
6
+ - inpainting
7
+ - stable-diffusion
8
+ - image-generation
9
+ - computer-vision
10
+ - diffusion
11
+ - image-editing
12
+ license: gpl-3.0
13
+ library_name: comfyui-extension
14
+ pipeline_tag: image-inpainting
15
+ datasets:
16
+ - stable-diffusion
17
+ - stable-diffusion-xl
18
+ - stable-diffusion-3
19
+ - qwen-image
20
+ - hidream
21
+ - flux
22
+ metrics:
23
+ - image-quality
24
+ - inpainting-accuracy
25
+ - consistency
26
+ ---
27
+
28
+ # LanPaint: Universal Inpainting Sampler
29
+
30
+ ## Model Description
31
+
32
+ LanPaint is a universal inpainting sampler that works with any Stable Diffusion model without requiring specialized training. It introduces a "think mode" that allows models to process multiple iterations before denoising, resulting in superior inpainting quality.
33
+
34
+ - **Developed by:** LanPaint Team
35
+ - **Model type:** ComfyUI Extension (Sampler)
36
+ - **License:** GNU General Public License v3.0
37
+ - **Repository:** [GitHub](https://github.com/scraed/LanPaint)
38
+ - **Paper:** [LanPaint: Training-Free Diffusion Inpainting with Exact and Fast Conditional Inference](https://arxiv.org/abs/2502.03491)
39
+
40
+ ## Intended Use
41
+
42
+ LanPaint is designed for:
43
+ - **Image Inpainting:** Fill in masked areas of images with contextually appropriate content
44
+ - **Image Outpainting:** Extend images beyond their original boundaries
45
+ - **Character Consistency:** Generate consistent character views and variations
46
+ - **Universal Compatibility:** Work with any Stable Diffusion model (SD 1.5, XL, 3.5, Flux, HiDream, Qwen-Image)
47
+
48
+ ## How to Use
49
+
50
+ ### Installation
51
+ 1. Install ComfyUI (version > 0.3.11)
52
+ 2. Install ComfyUI-Manager
53
+ 3. Install LanPaint via ComfyUI-Manager or clone to `custom_nodes` folder
54
+ 4. Restart ComfyUI
55
+
56
+ ### Basic Usage
57
+ - Use LanPaint nodes in the "sampling" category
58
+ - Same workflow as standard ComfyUI KSampler
59
+ - Supports any mask shape, size, or position
60
+ - Configurable "thinking" steps for quality vs. speed trade-off
61
+
62
+ ### Example Workflows
63
+ - Qwen Image inpainting/outpainting
64
+ - HiDream character consistency
65
+ - SD 3.5 high-quality inpainting
66
+ - Flux model inpainting (with low guidance)
67
+
68
+ ## Limitations
69
+
70
+ - **Distillation Models:** Reduced performance on models like Flux.dev (use low guidance 1.0-2.0)
71
+ - **Computation Time:** More thinking steps require more processing time
72
+ - **Memory Usage:** May require significant GPU memory for high-resolution images
73
+
74
+ ## Training and Technical Details
75
+
76
+ - **Training-free:** Works out-of-the-box with existing models
77
+ - **No fine-tuning required:** Universal compatibility across model architectures
78
+ - **Exact conditional inference:** Mathematically sound approach to inpainting
79
+ - **Fast implementation:** Optimized for real-world usage
80
+
81
+ ## Evaluation
82
+
83
+ LanPaint has been benchmarked against traditional inpainting methods:
84
+ - VAE Encode for Inpainting
85
+ - Set Latent Noise Mask
86
+ - Standard KSampler approaches
87
+
88
+ Results show significant improvements in:
89
+ - Content consistency
90
+ - Mask boundary handling
91
+ - Overall image quality
92
+ - Character preservation
93
+
94
+ ## Citation
95
+
96
+ ```bibtex
97
+ @article{lanpaint2024,
98
+ title={LanPaint: Training-Free Diffusion Inpainting with Exact and Fast Conditional Inference},
99
+ author={LanPaint Team},
100
+ journal={arXiv preprint arXiv:2502.03491},
101
+ year={2024}
102
+ }
103
+ ```
104
+
105
+ ## Additional Resources
106
+
107
+ - [ComfyUI Documentation](https://docs.comfy.org/)
108
+ - [LanPaintBench Repository](https://github.com/scraed/LanPaintBench)
109
+ - [Blog Post](https://scraed.github.io/scraedBlog/)
110
+ - [Community Examples](https://github.com/scraed/LanPaint/tree/master/examples)
111
+
112
+ ## License
113
+
114
+ This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.