ComfyUI tutorial: inpainting, outpainting and upscaling

Learn ComfyUI image editing with SAM 3 masks, FLUX.1 Fill outpainting and a practical comparison of 4x-UltraSharp with Real-ESRGAN.

Player not loading? Watch on YouTube

This Comfy 101 module teaches how to edit an existing generation instead of repeatedly replacing the whole image. The instructor builds a RealVis XL inpainting workflow around a coffee mug, then uses SAM 3 Text Segmentation to select objects by name. Grow Mask expands the selection, Feather Mask softens its edges, and InpaintModelConditioning combines the source pixels, mask and text conditioning. A second example uses the Mask Editor to draw selections by hand.

The examples also show where edits need more work. Removing the mug initially produces a block of wood, and its shadow remains outside the selection. The instructor adjusts the seed and mask, then recommends clearer replacement prompts and more overlap when seams appear. Separate SAM 3 nodes isolate parts of a landscape; changing "pine forest trees" to "forest" improves that selection, while lowering max detections limits duplicate masks.

FLUX.1 Fill extends an image beyond its original canvas. The video section covers Netflix's VOID inpainting model and introduces LTX 2.3 with an IC-LoRA for outpainting. The speaker says VOID can run locally after downloading the required models, though higher resolutions take longer and model resolution limits may apply.

The final section compares 4x-UltraSharp and Real-ESRGAN on a butterfly image. The instructor prefers ESRGAN for finer texture in this example. Topaz enhancement is introduced as an optional hosted API workflow.