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
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.
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
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.
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_nodesand install this repo as a custom node:git clone https://registry.comfy.org/publishers/diogod/nodes/inpainting-works
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-comfyYou can also update a custom node with git (but I recommend to do it with the manager)
-
Go inside the
custom_nodesfolder: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
This section will be fleshed out in more detail soon. Below is a structured placeholder:
Show Written Usage
Expand
- a. Flux Dev (Alimama)
- b. Flux Dev GGUF
- c. Flux Fill
Expand
- a. ControlNet Alimama
- b. Flux Tools: Depth and Canny
Expand
- a. Masking with grow and blur
- b. Aura Mask
- c. Invert Mask
Expand
(Details coming soon)
Expand
(Details coming soon)
Expand
(Details coming soon)
Expand
(Details coming soon)
Expand
(Details coming soon)
Expand
(Details coming soon)
Expand
(Details coming soon)
Expand
- a. Prompt Scheduling
- b. LoRA Scheduling
Expand
- a. Initial Resize
- b. Final Composite
- c. Second Composite
Expand
- a. Save Metadata
- b. CivitAI Metadata Support
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Comfy Inpainting Works Discord Server: https://discord.gg/EwKE8KBDqD
Diogod - Discord: diogod_59773
Project Link: https://github.com/diodiogod/Comfy-Inpainting-Works
List of ComfyUI Custom Nodes or resources!