612
59

.webp)

This workflow is a customized adaptation of the original workflow by lquesada (available at https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch), modified to be used with FLUX models, specifically for the GGUF quant models.
If you find any errors or possible optimizations, please leave a comment :)
Instructions from the original workflow:
Simplest way to run:
1. Load desired image in the "Load Image" node and mask the area you want to replace.
2. Select a checkpoint for inpainting in the "Load Checkpoint" node.
3. Write the positive and negative prompts in the green and red boxes. These prompts do not have to match the whole image, but only the masked area.
4. Adjust denoise (e.g. 1 to fully replace the content, ~0.8 to keep part of it, 0.1 to match around.
5. Run!
How to increase the context area for the model to know better what to draw:
- Option 1: Increase context_expand_factor, e.g. set it to 2.
- Option 2: Increase context_expand_pixels, e.g. set it to 100.
- Option 3: Duplicate the load image node and connect its mask to "optional_context_mask" in the "Inpaint Crop node". Mask the area that is relevant for context (no need to fill it, only the corners of the masked area matter.
The default parameters for Inpaint Crop and Inpaint Stitch work well for most inpainting tasks.
For SDXL, try the "forced size" mode which forces 1024x1024.