Contents

74 / 153

The ComfyUI Field Manual

The recipes, part one: img2img, inpainting, outpainting, upscaling

Chapter 73

2 min read

Reviewed v78 · August 2026

Most real work is the default graph with a node or two swapped in. Image-to-image is the smallest change: instead of an empty latent, you load a reference image and run it through a VAE Encode node to turn those pixels into a latent, then feed that to the KSampler. The single control that matters is denoise. Near one, the reference is almost ignored; around one half the model keeps the composition but repaints the detail; low, and it barely touches the image. Everything else is that one dial.

Fig.diagram
PIXELS1024 x 1024VAE ENCODERcompress 48xLATENT128 x 128DIFFUSIONMODELx30 STEPSnoise out, little by littleVAE DECODERexpand backIMAGEthe byproductTHE WHOLE TRICK: DENOISING RUNS IN THE SMALL LATENT SPACE, NOT ON PIXELS. THAT IS WHY IT IS AFFORDABLE.
The VAE compresses pixels into a small latent so the expensive work in compressed space stays affordable, then expands the finished latent back into pixels.

Inpainting swaps in a VAE Encode (for Inpainting) node, which takes the image, the VAE, and a mask marking what to change, plus a grow_mask_by value that feathers the boundary so the repaint blends instead of leaving a seam. You paint the mask right on the image by right-clicking the Load Image node and opening the MaskEditor. Outpainting is the same inpaint workflow with the mask made differently: a Pad Image for Outpainting node adds blank canvas on whatever sides you specify, with a feathering control, and hands the sampler a mask covering the new empty space.

Upscaling comes in two flavors people constantly confuse. A model upscaler (a Load Upscale Model node plus an Upscale Image node, driving an ESRGAN-family model like RealESRGAN) enlarges the finished pixels. A latent upscale enlarges the image while it is still latent and runs a second sampling pass over it, which is the classic hi-res fix: generate small, upscale the latent, sample again at low denoise to invent detail. Chaining upscalers, two times then four times, is common. Which you reach for depends on whether you want faithful enlargement, which is the model upscaler, or a second creative pass that adds detail, which is the latent route.

Check your understanding

pass: 5 of 7

Answer at least 5 of 7 correctly to unlock the next chapter.

  1. 1. In image-to-image, what turns the reference picture into something the sampler can use?

  2. 2. What does a denoise value near one do in image-to-image?

  3. 3. What is the purpose of the grow_mask_by value in inpainting?

  4. 4. How is outpainting related to inpainting in ComfyUI?

  5. 5. What is the difference between a model upscaler and a latent upscale?

  6. 6. Why would you reach for a latent upscale rather than a model upscaler?

  7. 7. How do you paint an inpainting mask onto an image in ComfyUI?

The weekly briefing

Get the week's moves in your inbox.

A short, sourced digest of what actually moved across generative AI, every week. Free.

Free. One email a week, no spam, unsubscribe anytime. Prefer a reader? RSS.