ComfyUI Inpaint Nodes - A plugin for ComfyUI that enhances image inpainting and outpainting capabilities.
## Purpose of ComfyUI Inpaint Nodes
ComfyUI Inpaint Nodes is a plugin for ComfyUI that enhances image inpainting (repairing missing or damaged parts of an image) and outpainting (extending an image beyond its original boundaries). It provides tools and model support for tasks like object removal, photo restoration, and creative image editing.
## Supported Models in ComfyUI Inpaint Nodes
The plugin supports the following inpainting models:
- **Fooocus inpaint for SDXL**: A model optimized for Stable Diffusion XL (SDXL).
- **LaMa**: A general-purpose inpainting model.
- **MAT**: Another inpainting model suitable for various scenarios.
## Preprocessing Tools in ComfyUI Inpaint Nodes
The plugin includes the following preprocessing tools for mask optimization:
- **Expand Mask**: Enlarges the masked area.
- **Fill Masked**: Fills the masked region using methods like neutral, telea, or navier-stokes modes.
- **Blur Masked**: Applies blurring to the masked area for smoother transitions.
## Installation Guide for ComfyUI Inpaint Nodes
To install the plugin:
1. **Download Models**: Obtain the Fooocus inpaint model from [Hugging Face](https://huggingface.co/lllyasviel/fooocus_inpaint/tree/main) and place it in `ComfyUI/models/inpaint`.
2. **Install Plugin**:
- Use **ComfyUI Manager** for direct installation.
- Alternatively, clone the [GitHub repository](https://github.com/Acly/comfyui-inpaint-nodes) into `ComfyUI/custom_nodes`.
3. **Install Dependencies**: For telea/navier-stokes modes, install OpenCV via `pip install opencv-python`.
## Example Workflows in ComfyUI Inpaint Nodes
The plugin offers several example workflows for different use cases:
- [inpaint-simple.json](https://raw.githubusercontent.com/Acly/comfyui-inpaint-nodes/main/workflows/inpaint-simple.json): Basic inpainting.
- [inpaint-refine.json](https://raw.githubusercontent.com/Acly/comfyui-inpaint-nodes/main/workflows/inpaint-refine.json): Refined inpainting.
- [outpaint.json](https://raw.githubusercontent.com/Acly/comfyui-inpaint-nodes/main/workflows/outpaint.json): Outpainting (image extension).
- [inpaint-preprocess.json](https://raw.githubusercontent.com/Acly/comfyui-inpaint-nodes/main/workflows/inpaint-preprocess.json): Preprocessing-focused workflow.
- [inpaint-promptless.json](https://raw.githubusercontent.com/Acly/comfyui-inpaint-nodes/main/workflows/inpaint-promptless.json): Inpainting without prompts.
## Tutorial Resources for ComfyUI Inpaint Nodes
A detailed tutorial video is available on [Bilibili](https://www.bilibili.com/video/BV1HQA5eLERx). It covers:
- Node functionalities.
- Workflow setup.
- Practical demonstrations of inpainting and outpainting.
- Usage of fill methods and style transfer with IPAdapter.
## Key Features of ComfyUI Inpaint Nodes
Key features include:
- **Multi-Model Support**: Compatibility with Fooocus, LaMa, and MAT.
- **Preprocessing Tools**: Mask expansion, filling, and blurring.
- **Postprocessing Tools**: Denoising for seamless compositing.
- **Outpainting Support**: Tools like "Pad Image for Outpainting" for image extension.
- **Workflow Integration**: Nodes like VAE Encode and Inpaint Conditioning for ComfyUI compatibility.
## Denoising Strength for VAE Encode
When using VAE Encode directly with the plugin, a denoising strength of **1.0** is recommended for optimal results.
### Citation sources:
- [ComfyUI Inpaint Nodes](https://github.com/Acly/comfyui-inpaint-nodes) - Official URL
Updated: 2025-04-01