ComfyUI Node

EZ img2img

Img2img and inpaint in one node

By Pauan·Created 8 months ago·Updated 5 months ago· 3
EZ img2img
  • image
  • mask
  • IMAGE
image_weight0.0

EZ Image - shown in the menu as EZ img2img - is the node you reach for when you have a source image and want a new image based on it. One node covers both plain img2img and masked inpainting; the difference is whether you feed it a mask.

Three inputs:

  • image (IMAGE) - the source image.
  • image_weight (FLOAT, default 0, range 0–1, step 0.1) - the honesty dial. The tooltip says it best: "Higher number means it closely matches the image, lower number means more random." This is the node's denoise control under another name: the pack samples at denoise = 1 - image_weight.
  • mask (MASK, optional) - supply one and only the masked region changes. The tooltip: "Only generates inside of the masked region."

The output is IMAGE (EZ_IMAGE_SETTINGS), the settings bundle that carries the source image + weight + mask into EZ Generate - usually via EZ Crop and/or EZ Detail on the way.

The three modes

This node's behavior is really three modes hiding behind a dial:

Pure regeneration (weight 0). The source image is ignored except as a size reference - EZ Generate builds an empty latent at the image's dimensions and runs full txt2img-style denoise. Good for "same size, different content."

img2img (weight > 0, no mask). The source is VAE-encoded and partially denoised. Weight 0.5 keeps roughly half the original structure; weight 0.8 keeps almost everything and only nudges details. This is the classic "change the vibe, keep the subject" territory.

Inpaint (weight > 0, with mask). The masked region gets regenerated while the unmasked part is kept bit-identical - the pack uses InpaintModelConditioning and composites the result so only the mask changes. The mask is a shape; image_weight is still your denoise dial for how much of the masked pixels survive.

What masked inpainting is still for

It's worth being honest about the landscape here: instruction-editing models (Flux Kontext, Qwen-Image-Edit, Flux 2 Klein) took over most of what people used to inpaint, and they're often easier. But mask-based inpainting still uniquely owns bit-identical unmasked pixels, the denoise dial (a number, not a yes/no), and targeted detail work - the "fix the eye without touching the nose" case where an edit model would happily move both. On SDXL-lineage checkpoints, EZ Image + EZ Crop is a solid regional-inpaint setup, and paired with EZ Detail it's the classic face-fix pass: crop tight, low weight, done.

Installing it

It ships with the Prompt Helpers pack. In ComfyUI Manager search "Prompt Helpers" (Pauan/comfyui-prompt-helpers), install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/Pauan/comfyui-prompt-helpers

Restart ComfyUI. No model downloads; the pack needs PyYAML and desktop-notifier and ComfyUI 0.8.0+.

The classic gotcha: forgetting the mask. People wire an image into EZ Image expecting inpainting, leave the mask socket empty, and get a full img2img rewrite of the whole frame. If "only the region changed" didn't happen, check that the mask is actually connected - and remember the mask does the work only when combined with EZ Generate's composite step, which it always is in the normal chain.

Categoryprompt_helpers/image

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
image_weightFLOAT0.00–1How much the image should influence the result. Higher number means it closely matches the image, lower number means more random.
maskoptMASKOnly generates inside of the masked region.

Outputs (1)

NameTypeDescription
IMAGEEZ_IMAGE_SETTINGS