A workflow for segment editing, inpainting or swapping with Qwen 2511.
8192x4096 images can be very hard and slow to work with - but if you only need a single character it will probably be done within 20 seconds using crop and stitch. But the most important is that these edits will maintain the image quality, only modifying the part you need to.
Load image and additional references
Here you can load the main image to edit, decide if you want to resize it - either shrink or upscale. Then you can enable the additional reference images for swapping, inserting or just referencing them. You can also provide the mask with the main reference image - not providing it will use the whole image (unmasked) for the simple workflow, or the segmented part for the normal workflow.
Initialize
You can select the model, light LoRA, CLIP and VAE here. You can also provide what to segment here as well as growing mask and blur mask here.
Sampler
Sampler settings and you can select upscale model here (if your image is smaller than 0.75Mpx for the edit it will upscale to 1Mpx regardless, but this will also be used if you upscale the image to total megapixels).
Nodes you will need
Some of them already come with ComfyUI Desktop and Portable too, but this is the total list, kept to only the most well maintaned and popular nodes. For the non-simple workflow you will also need SAM3 and LayerStyle nodes, unless you swap it to your segmentation method of choice.
RES4LYF
WAS Node Suite
rgthree-comfy
ComfyUI-Easy-Use
ComfyUI-KJNodes
ComfyUI_essentials
ComfyUI-Inpaint-CropAndStitch
ComfyUI-utils-nodes
Info
I will be making an outpainting method in addition to further optimizing this in the coming days. The reference images were made with an earlier version of the workflow, but it still works the same.

