comfyui-inpaint-nodes

922

Documentation

ComfyUI Inpaint Nodes Documentation

Overview

The ComfyUI Inpaint Nodes repository provides a set of custom nodes aimed at improving inpainting within the ComfyUI application. With support for Fooocus inpaint models tailored for SDXL, as well as LaMa and MAT models, this repository offers versatile tools for pre-filling inpaint and outpaint areas, enabling seamless editing of images.

Installation

To install the ComfyUI Inpaint Nodes, you have several options:

  1. Using ComfyUI Manager:

    • Search for "ComfyUI Inpaint Nodes" within ComfyUI Manager and install directly.
  2. Manual Installation:

    • Download the repository from its GitHub page and place the folder into ComfyUI/custom_nodes.
  3. Using GIT:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Acly/comfyui-inpaint-nodes.git
    

After installation, restart ComfyUI to load the new nodes.

Additionally, OpenCV is required for certain fill modes such as telea and navier-stokes. Install it using:

pip install opencv-python

Purpose of the Repository

This repository is designed to enhance and streamline the inpainting capabilities of ComfyUI by integrating advanced inpaint models such as Fooocus, LaMa, and MAT. It provides users powerful nodes to fill, expand, and refine masked areas within images for inpainting and outpainting tasks.

Available Nodes

Here are the key nodes provided in this repository, along with their capabilities:

  1. INPAINT_LoadFooocusInpaint: Loads the Fooocus inpaint model to be applied on SDXL checkpoints.

  2. INPAINT_ApplyFooocusInpaint: Applies the loaded Fooocus inpaint model to seamlessly fill and expand areas in an image.

  3. INPAINT_VAEEncodeInpaintConditioning: Provides latent outputs for integration with Fooocus inpaint and VAE encoding, minimizing overhead.

  4. INPAINT_MaskedFill: Fills the masked area with transitions, offering modes like neutral, telea, and navier-stokes.

  5. INPAINT_MaskedBlur: Blurs the image into the masked area for smooth visual transition.

  6. INPAINT_LoadInpaintModel: Loads alternative inpaint models such as LaMa and MAT for application on masked regions.

  7. INPAINT_InpaintWithModel: Uses the loaded inpaint model (LaMa/MAT) to perform inpainting on designated areas.

  8. INPAINT_ExpandMask: Expands and feathers the mask area for smoother transitions at the edges.

  9. INPAINT_DenoiseToCompositingMask: Converts a mask to a compositing mask suitable for differential diffusion within ComfyUI.

Special Features and Capabilities

  • Seamless Integration with Fooocus Models: Transform SDXL checkpoints into inpaint models using the Fooocus integration.

  • Advanced Pre-processing: Utilize nodes like Blur Masked, Masked Fill, and Expand Mask to prepare precise inpainting areas.

  • Support for LaMa and MAT Models: Load and apply efficient inpainting models suitable for both local inpainting and outpainting tasks.

  • Denoise and Compositing Features: Use specialized nodes to enhance denoising and compositing workflows, improving output quality.

Utility in ComfyUI Workflows

The nodes provided by this repository enhance ComfyUI's image modification capabilities, making it possible to:

  • Seamlessly fill and expand areas of an image using state-of-the-art inpaint models.
  • Refine and preserve outpainting details with pre-processing and conditioning nodes.
  • Integrate advanced inpainting and post-processing techniques for professional-quality edits.

Example workflows that utilize these nodes are included in the repository, offering users inspiration and starting points for their image editing projects. These workflows include simple inpainting, refining existing content, outpainting, pre-processing, and promptless operations.

For more details or to use example workflows, visit the repository's workflow directory: Example Workflows.