ComfyUI-Flux-Inpainting

ComfyUI-Flux-Inpainting
★ 45

图像修复外拓扩展低 VRAMFlux Fill
将 NF4 Flux Fill 模型封装为 ComfyUI 节点,支持图像 inpainting 与 outpainting,在更低 VRAM 条件下也能高效修复与扩展画面。
💡 在资源受限的设备上对图片缺损区域进行修补与画面扩展。
🍴 2 Forks💻 Python🔄 2025-05-14
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/a9fb3a59e10c
📦 requirements.txt
numpy
diffusers>=0.32.0
transformers>=4.45.0
bitsandbytes>=0.44.0
accelerate>=1.1.1
gguf>=0.10.0
plot
plot
plot
plot
plot
📄 README

ComfyUI-Flux-Inpainting

Introduction

This repository wraps the flux fill model as ComfyUI nodes. Use NF4 flux fill model, support for inpainting and outpainting image. Compared to the flux fill dev model, these nodes can use the flux fill model to perform inpainting and outpainting work under lower VRM conditions

News

  • Dec 26, 2024: Add FluxGuffInpainting node to support loading gguf models
  • Dec 11, 2024: Add FluxSimpleInpainting, FluxTransformerInpainting, FluxVAELoader nodes can be used to split pipelines and comfyui clip and vae loader can be used instead
  • Installation

    Method 1:

  • Navigate to the node directory, ComfyUI/custom_nodes/
  • git clone https://github.com/rubi-du/ComfyUI-Flux-Inpainting.git
  • cd ComfyUI-Flux-Inpainting
  • pip install -r requirements.txt
  • Restart ComfyUI
  • Method 2:

    Directly download the node source code package, unzip it into the custom_nodes directory, and then restart ComfyUI.

    Method 3:

    Install via ComfyUI-Manager by searching for “ComfyUI-Flux-Inpainting”.

    Usage

  • Example workflows are placed in ComfyUI-Flux-Inpainting/workflow.
  • FluxInpainting node workflow: Workflow Address
  • FluxSimpleInpainting node workflow: Workflow Address
  • FluxTransformerInpainting node workflow: Workflow Address
  • FluxGuffInpainting node workflow: Workflow Address
  • Nodes

  • FluxInpainting
  • FluxSimpleInpainting
  • FluxTransformerInpainting
  • FluxVAELoader
  • FluxGuffInpainting
  • FluxGuffInpainting special Instruction

    The FluxGuffInpainting node only need to load the guff model and put them into the ComfyUI/models/unet folder and don’t need load other submodels from FLUX.1-Fil-dev

    vae model download links: https://hf-mirror.com/YarvixPA/FLUX.1-Fill-dev-gguf/tree/main

    FluxTransformerInpainting special instruction

    The FluxTransformerInpainting node only need to load the transformer submodel from the FLUX.1-Fil-dev-nf4 model and don’t need load other submodels from FLUX.1-Fil-dev

    FluxVAELoader special instruction

    The FluxVAELoader node need to load the flux fill vae model from the ComfyUI/models/vae directory, so you need to download the model and place it in the ComfyUI/models/vae directory

    vae model download links: https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/tree/main/vae

    Models

    The node needs to load the transformer and text_decoder_2 submodels from the FLUX.1-Fil-dev-nf4 model and load other submodels from FLUX.1-Fil-dev, so these two models need to be placed in the models folder

    Model download links:

    FLUX.1-Fil-dev: https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev

    FLUX.1-Fil-dev-nf4: https://huggingface.co/sayakpaul/FLUX.1-Fill-dev-nf4

    FLUX.1-Fill-dev-gguf: https://hf-mirror.com/YarvixPA/FLUX.1-Fill-dev-gguf/tree/main

    The directory structure is as follows:

    ComfyUI/models/
    └── FLUX.1-Fill-dev
        ├── vae
        └── scheduler
        └── text_encoder
        └── ...
    └── FLUX.1-Fill-dev-nf4
        ├── transformer
        └── text_decoder_2

    Workflows

    Usage of inpainting workflow

    Workflow Address


    Usage of outpainting workflow

    Workflow Address


    Usage of FluxSimpleInpainting workflow

    Workflow Address


    Usage of FluxTransformerInpainting workflow

    Workflow Address


    Usage of FluxGuffInpainting workflow

    Workflow Address