FLUX Inpaint (Checkpoint & GGUF)
5.0
0 reviewsDescription
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 :)
Note 1:
A smaller context area results in faster generation times, but also limits the model's "understanding" of the image.
Note 2:
To avoid seams, make sure to leave a gap between the context area borders and the masked region.
Tip:
You can define the context area by simply drawing two points: one for the upper-left corner and one for the bottom-right corner. This is a quicker alternative to drawing a full square
Example image:
The left node contains the context area, while the right node contains the part of the image you want to inpaint.
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.
This workflow uses the third option to increase the context area listed in the instructions.
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.ar
Discussion
(No comments yet)
Loading...
Resources (1)
Reviews
No reviews yet
Versions (4)
- latest (a year ago)
- v20240820-180713
- v20240819-222106
- v20240817-153421
Node Details
Primitive Nodes (10)
Context (rgthree) (2)
Context Switch (rgthree) (1)
Fast Groups Bypasser (rgthree) (1)
Fast Groups Muter (rgthree) (1)
FluxGuidance (1)
Image Comparer (rgthree) (1)
InpaintExtendOutpaint (1)
Note (1)
UnetLoaderGGUF (1)
Custom Nodes (20)
ComfyUI
- LoadImage (2)
- VAEDecode (1)
- VAELoader (1)
- CLIPTextEncode (1)
- DualCLIPLoader (1)
- SamplerCustomAdvanced (1)
- BasicGuider (1)
- InpaintModelConditioning (1)
- DifferentialDiffusion (1)
- ConditioningCombine (1)
- BasicScheduler (1)
- KSamplerSelect (1)
- RandomNoise (1)
- SaveImage (1)
- PreviewImage (1)
- CheckpointLoaderSimple (1)
- InpaintCrop (1)
- InpaintStitch (1)
- SystemNotification|pysssss (1)
Model Details
Checkpoints (0)
LoRAs (0)