FLUX Inpaint CropAndStitch
created 8 months ago
inpainting
img2img
21 nodes

612

59

Credits
Credits to Luis Quesada for the custom nodes and workflow (https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch)
Outputs
example image output 0 for workflow.
example image output 1 for workflow.
example image output optimized_comfy_workflows_user_uploads/0d2cf60c-467f-4b5c-9128-9a377c4805bc/assets/nukacola.webp for workflow.
Description

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.

Built-in nodes
SamplerCustomAdvanced
BasicGuider
DifferentialDiffusion
FluxGuidance
RandomNoise
Custom nodes
InpaintCrop
InpaintStitch
LoadImage
VAEDecode
VAELoader
UnetLoaderGGUF
CLIPTextEncode
DualCLIPLoader
InpaintModelConditioning
ConditioningCombine
BasicScheduler
KSamplerSelect
SaveImage
0
0
0
0