ComfyUI tutorial: inpainting and folder batch edits
Learn ComfyUI crop-and-stitch inpainting and folder batch processing, with mask context, color matching and outputs that retain original filenames.
Player not loading? Watch on YouTube
This ComfyUI tutorial uses Pixaroma nodes with Flux Klein to edit selected image areas and process images from a folder. The presenter starts by updating the easy installer or cloning the nodes with Git, then connects Inpaint Crop Pixaroma before VAE encoding and Inpaint Stitch Pixaroma after VAE decoding. Crop information carries the mask and position needed to place the edited area back into the original.
The examples cover changing a hat, removing an object and adding a necklace. The mask editor controls the selected area and surrounding context; the demonstrated default targets a longest side of about 1,024 pixels. The presenter explains why a mask needs enough room for the requested change. Color matching and softer edges can improve blending, but the examples still show color differences, and the speaker says color matching does not always work.
Background replacement uses either a transparent PNG's mask or an inverted mask from the background-removal node. The full image passes through generation at the configured size before stitching.
The final section replaces the single-image loader with Load Images From Folder. Selected files run through the workflow automatically. The demonstration covers square crops, size limits and Flux Klein background edits. Connecting the filename output keeps the original filename within each saved generation's name.