CivArchive
    Preview 43364436
    Preview 43364439
    Preview 43364524
    Preview 43364522

    Since CivitAI is going down THE DRAIN

    I won't be updating this workflow here anymore, and I won't post any more models from now on.

    I hope to find interest from people to keep updating this. Thanks everyone!

    Keep following this workflow development and more on my new Discord server: https://discord.gg/EwKE8KBDqD

    Get new releases from GitHub: https://github.com/diodiogod/Comfy-Inpainting-Works


    Now there is a "simple/compact" version that I will update together with the normal one.
    Read "about this model" on the right panel please!! I recommend reading v6.0, v5.0, v5.1 as well.

    This is a proper inpainting with alimama control-net + Flux Fill + Flux Tools (Depth an Canny) support from V7 and above.

    I try my best to avoid hiding the workflow flow, while balancing keeping it clean and user-friendly.

    This workflow will make sure your image is composited in the end to prevent VAE degradation AND from v5 will make sure your image is a multiple of 8 (so it doesn't get resized by ksampler) at the same time it avoids resizing at all (unless you want to) since resizing will degrade the original image as well.

    For inpainting that leaves a face and changes the whole background and character, Alimama works way better. Alimama also works better for LoRas. Alimama is terrible at outpainting and Flux Fill is amazing. You should test both. My comfyUI OOM or crashes when switching from one to the other IF my system memory page file is not large enough. With a pagefile of 50GB I can freely switch from Flux Fill to normal Flux Dev now.

    It does use a lot of custom nodes to make life easier and workflow cleaner. Use manager to install the missing ones.

    Supports loading of an external mask (need to match the image size) or doing the inpainting within the right-click "Open MaskEditor" on the image itself.

    Supports FILL -the normal fill, like Auto1111- (use FastBypasser - black node)

    Supports area inpaiting x full image inpaiting (use FastBypasser - black node)

    Supports variable denoise (Change denoise on the CONTROL ROOM)

    Supports Negative (use FastBypasser - black node)

    Proper composite so no VAE degradation

    Support for Flux Tools (Depth an Canny) with Alimama

    I added LoRa support and Daemon Detailer support (both are optional)

    Description

    So I decided NOT to RESIZE by default the image to a divisible by 8 resolution because as pointed out by Jeffu here resizing brings quality loss as well. So a solution I came up with is to crop the sides of the image to a divisible by 8 and then, after inpainting, composite it back to restore those pixels so you get in the end the same image resolution you started with (of course, that is if you did not turn the resize node option).

    This is not going to be the case for outpainting since outpainting will always result in a bigger image and the resolution will always be deviable by 8. I did not change that.

    This final/second composite has a problem that if you inpaint the whole image, or the right side of the image, it will restore those cropped original pixels back to the right side or bottom side. That might look weird. Because of that, you can bypass the final composite if you want. In that case, you will end up with an image that is divisible by 8 (this is better anyway, but it's not the default)

    Finally, another note, if anyone is reading. Flux does not like some resolutions, so a divisible by 32 or 64 should work better. Some images get a weird black bar on the corners that remain there no matter what seed you use. That is because of the uncommon resolution. But since it's not mandatory, I decided to stick with 8. But you can reflect on that when inpainting and outpainitng.

    FAQ

    Workflows
    Flux.1 D

    Details

    Downloads
    146
    Platform
    CivitAI
    Platform Status
    Available
    Created
    12/2/2024
    Updated
    5/12/2026
    Deleted
    -