Skip to content

This repository is dedicated to maintaining, updating, fixing bugs and keeping up to date my inpainting ComfyUI workflow, previously hosted on CivitAI called: Proper Flux Control-Net inpainting and/or outpainting with batch size - ComfyUI - Alimama or Flux Fill

Notifications You must be signed in to change notification settings

diodiogod/Comfy-Inpainting-Works

Repository files navigation

Stargazers Issues Forks Dynamic TOML Badge


Logo

Comfy-Inpainting-Works

This repository is dedicated to maintaining, updating, fixing bugs and keeping up to date BOTH my Expanded and Compact inpainting ComfyUI workflow. It was previously hosted on CivitAI called:

Proper Flux Control-Net inpainting and/or outpainting with batch size - ComfyUI - Alimama or Flux Fill

Report Bug · Request Feature · Install it with the Manager

Table of Contents
  1. About The Project
  2. Getting Started
  3. Written Usage
  4. Roadmap
  5. Contributing
  6. Discord Server
  7. Contact
  8. Acknowledgments

About The Project

The core objective with this workflow is to make the best flux inpainting for ComfyUI that is done correctly. Meaning:

  • $${\color{yellow}Compositing}$$ (not damaging the non-inpainted original pixels with VAE degradation)
  • $${\color{orange}Making \space sure \space the \space image \space it’s \space divisible \space by \space 8}$$ (preserving the original image quality by not stretching it while using it).

It started as me trying to make a simple Flux inpainting workflow, but after that the idea to make this as complete and well done as possible started growing on me. It ended up not being that simple anymore, as I added more and more interesting tools and options, either to make life easier or to improve the inpainting results.

As I pointed out here, Comfyorg themselves forgets about compositing and teaches it in the wrong way in their basic inpaint workflow, unfortunately. This led to a widespread of bad inpainting workflows out there and pretty much all workflows have this basic mistake.

Because the expanded workflow might look rather monstrous and scary, and frankly not user friendly, I also aimed to publish a “Compact” version, where everything is hidden and nodes are kept in a clean interface with options more at reach. And some decisions are made for you. They are supposed to be the same but one thing or other might be missing on Compact as it lags behind on me updating it. Also, it’s way harder for the user to customize it, for example adding a new control-net.

(back to top)

Features

Flux Dev with Alimama 🔷 Batches 🔷 Flux Fill 🔷 Flux Kontext ❗🔷 Flux Tool Loras: Depth or Canny 🔷 Mask grow with blur 🔷 Mask Aura 🔷 Outpainting 🔷 LoRA support 🔷 Localized Area Inpainting 🔷 Daemon Detailer 🔷 Fast Fill (like Auto1111 Fill) 🔷 Negative Thresholding 🔷 Loops 🔷 Prompt Scheduling 🔷 LoRA Scheduling 🔷 Original Image Resize 🔷 Compositing 🔷 Keep Original Metadata 🔷 Save Metadata / CivitAI Metadata

(back to top)

Videos:

Most of the features and how to use them was explained in this video where I tried to show most parts of this workflow. As I increment new things, I’ll make new videos, so stay tuned and subscribe to the YouTube channel.

Other more recent videos:

(back to top)

Getting Started

$${\color{lightgreen}Prerequisites}$$

$${\color{lightgreen}1)}$$ This is a ComfyUI workflow so, first of all you will need ComfyUI. Head up there and install it

$${\color{lightgreen}2)}$$ This workflow uses a lot of custom nodes. I’m sorry, but they are needed. So, I recommend to install ComfyUI-Manager.

$${\color{lightgreen}3)}$$ This workflow is now a "custom_node" and can be installed manually or through the ComfyUI Manager. It is not a real "node". This is so you can keep it up-to-date more easily AND so you can access the workflow more convinently by going into you comfyUI upper tab Workflow > Browse Templates > Comfy_Inpainting_Works

You can Find it on the ComfyUI Manager by searching for inpainting works.

OR

To mannually install it:

  • Go to your ComfyUI custom_node installation folder ComfyUI\custom_nodes and install this repo as a custom node:

    git clone https://registry.comfy.org/publishers/diogod/nodes/inpainting-works
    

$${\color{lightgreen}4)}$$ After you have the Manager, you can either drop the workflow .json file inside a ComfyUI screen or If you installed thi as a custom node go to Workflow > Browse Templates > Comfy_Inpainting_Works. After opening the workflow you will probably find a lot of red nodes, so you needd to install all missing nodes trough the manager. IF one fails, you might want to visit each custom node page and might need to install it manually with git clone on ComfyUI\custom_nodes folder.

  • Exemple, inside ComfyUI\custom_nodes:

    git clone https://github.com/rgthree/rgthree-comfy
    

    You can also update a custom node with git (but I recommend to do it with the manager)

  • Go inside the custom_nodes folder:

    git pull
    

Warning

Keep in mind it’s very common that every time comfyui updates, specially the Comfyui Frontend, something in this workflow might break. I’ll try my best to keep things up do date but it might not always be possible.

Here is a list of all custom nodes on this workflow:

List: placeholder

(back to top)

Written Usage

This section will be fleshed out in more detail soon. Below is a structured placeholder:

Show Written Usage

1. Loading the Models

Expand
  • a. Flux Dev (Alimama)
  • b. Flux Dev GGUF
  • c. Flux Fill

2. ControlNet Integration

Expand
  • a. ControlNet Alimama
  • b. Flux Tools: Depth and Canny

3. Masking Techniques

Expand
  • a. Masking with grow and blur
  • b. Aura Mask
  • c. Invert Mask

4. Outpainting

Expand

(Details coming soon)

5. Basic LoRA

Expand

(Details coming soon)

6. Localized Area Inpainting

Expand

(Details coming soon)

7. Daemon Detailer

Expand

(Details coming soon)

8. Fast Fill (Auto1111-style)

Expand

(Details coming soon)

9. Negative Thresholding

Expand

(Details coming soon)

10. Loops

Expand

(Details coming soon)

11. Scheduling

Expand
  • a. Prompt Scheduling
  • b. LoRA Scheduling

12. Resizing and Compositing

Expand
  • a. Initial Resize
  • b. Final Composite
  • c. Second Composite

13. Metadata

Expand
  • a. Save Metadata
  • b. CivitAI Metadata Support

(back to top)

Roadmap

  • Discord Channel
  • Implement Loops
  • Look into implementing Flux Tool: Redux
  • Flux Kontext

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this workflow better, please fork the repo and create a pull request. Or simply send me the json in any other way. You can also open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

contrib.rocks image

(back to top)

Discord Server

Comfy Inpainting Works Discord Server: https://discord.gg/EwKE8KBDqD

(back to top)

Contact

Diogod - Discord: diogod_59773

Project Link: https://github.com/diodiogod/Comfy-Inpainting-Works

(back to top)

Acknowledgments

List of ComfyUI Custom Nodes or resources!

(back to top)

About

This repository is dedicated to maintaining, updating, fixing bugs and keeping up to date my inpainting ComfyUI workflow, previously hosted on CivitAI called: Proper Flux Control-Net inpainting and/or outpainting with batch size - ComfyUI - Alimama or Flux Fill

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages