Nodes/SeargeSDXL/Image to Image and Inpainting v2
ComfyUI Node Runs on cloud

Image to Image and Inpainting v2

The denoise + mask controls for img2img and inpaint

By SeargeDP·Created 3 years ago·Updated 2 years ago· 874
Image to Image and Inpainting v2
  • data
  • data
denoise0.50
inpaint_mask_blur16
inpaint_mask_mode

This node is the small control panel that switches the Searge workflow into image-to-image or inpainting mode. It's compact - three settings - but those three decide how much your source image survives and, when you're inpainting, how the masked area blends back in. It doesn't do the sampling itself; it feeds these settings into the data stream that the rest of the v4 workflow reads.

It lives under Searge/UI/Inputs, so it's part of the current v4.x design (note the "v2" in its display name). The one integrated Searge workflow handles txt2img, img2img, and inpainting all in the same graph - which mode you're in depends on whether a source image and mask are present, and this node is where you tune the two image-driven modes.

How it works

The heart of it is denoise. In img2img and inpainting, denoise controls how far the model strays from your source: low values keep the composition and only nudge detail, high values throw most of the original away and reinvent it. This is a continuum, not an instruction - if you want the jacket a bit darker, that's a small denoise number, not a stronger prompt. The default here is 0.5, a reasonable middle; for detail-preserving fixes 0.3–0.4 is safer, and the single most common mistake is setting it too high and watching the whole masked region change into something unrelated.

For inpainting, the mask controls handle the blend. inpaint_mask_blur feathers the mask edge so the regenerated area doesn't sit in the image with a hard seam. inpaint_mask_mode picks where the mask comes from - the region you painted on the source (masked - full) or a separately uploaded mask image (uploaded - full).

The inputs and outputs that matter

Three settings, and the first is the one that matters most:

  • denoise (default 0.5) - how much of the source to keep. This is your main dial. Low for touch-ups, high for big changes.
  • inpaint_mask_blur (default 16, in steps of 4 up to 24) - edge feathering on the mask. More blur = softer, more blended transitions; too little leaves visible seams.
  • inpaint_mask_mode - masked - full (the mask you drew) or uploaded - full (a mask you supplied).

Connectors: an optional data input and a data output, both SRG_DATA_STREAM, threading these settings into the workflow.

How to install it

ComfyUI Manager: search SeargeSDXL, install, restart. Manual: python -m pip install opencv-python in ComfyUI's Python env - this pack genuinely needs OpenCV, and inpainting/masking is exactly the kind of thing that leans on it - then cd ComfyUI/custom_nodes && git clone https://github.com/SeargeDP/SeargeSDXL.git, restart. Windows portable has an installer script that also pulls the SDXL checkpoints and the fp16-fix VAE.

No dedicated model for this node, but the workflow it drives needs the SDXL base checkpoint and, ideally, the fixed VAE.

Where people get burned

  • Denoise too high for a small fix. Above ~0.5 the composition drifts and your careful mask stops mattering. For faces, hands, and small detail work, keep it low (0.3–0.4).
  • Hard seams around inpaints. That's under-blurred mask edges. Bump inpaint_mask_blur up. Color shifts at the seam are usually a VAE mismatch - make sure the fixed SDXL VAE is loaded.
  • Wrong mask source. If your painted mask seems ignored, check whether inpaint_mask_mode is set to uploaded - full while you're expecting it to use the one you drew.
  • Missing OpenCV. Skip the pip install opencv-python step and the pack's masking paths can fail to load. Do it once, up front.
CategorySearge/UI/Inputs

Inputs (4)

NameTypeDefaultDescription
denoiseFLOAT0.500–1
inpaint_mask_blurINT160–24
inpaint_mask_modeCOMBO2 options: masked - full, uploaded - full
dataoptSRG_DATA_STREAM

Outputs (1)

NameTypeDescription
dataSRG_DATA_STREAM