Nodes/SeargeSDXL/Image Adapter v2
ComfyUI Node Runs on cloud

Image Adapter v2

Feed a source image and mask into Searge's data stream

By SeargeDP·Created 3 years ago·Updated 2 years ago· 874
Image Adapter v2
  • data
  • source_image
  • image_mask
  • uploaded_mask
  • data
  • image_inputs

Image Adapter v2 is the node that gets a source image and a mask into the Searge workflow. If you're doing image-to-image or inpainting, this is where your picture enters the pipeline. In text-to-image you don't need it at all.

It's part of SeargeSDXL, the SDXL base-and-refiner workflow pack Searge released at SDXL 1.0's launch in 2023. The v4.x version of that pack routes everything through a single SRG_DATA_STREAM data bus, and this node's whole job is to attach image data to that bus so the samplers downstream have something to work from. The "v2" and the Searge/UI/Prompting category - not _deprecated_ - tell you this is a current node, not a retired one.

How it works

You hand it a source_image and, optionally, a mask. It packs those onto the data stream and passes it along. Downstream, when the Operating Mode is set to image-to-image, the workflow encodes your source into a latent and denoises from there instead of from noise; set to inpainting, it also uses the mask to limit changes to the region you painted.

There are two mask inputs, and the distinction matters: image_mask is a mask that travels with the image (for example, the alpha you attached in a Load Image node), while uploaded_mask is a mask supplied separately. Feed whichever one matches how you made your mask. If both exist the workflow has a defined precedence, but for most people it's one or the other.

The inputs and outputs that matter

All inputs are optional, which is what lets the same node sit in a text-to-image graph doing nothing harmful:

  • source_image (IMAGE) - your input picture for img2img/inpainting.
  • image_mask / uploaded_mask (MASK) - the inpainting region, depending on where your mask came from.
  • data (SRG_DATA_STREAM) - the incoming bus.
  • Outputs: data (the bus, updated) and image_inputs (a SRG_DATA_STREAM carrying just the image side). Wire data onward through the rest of the config nodes.

How to install it

ComfyUI Manager: search SeargeSDXL, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/SeargeDP/SeargeSDXL.git, then restart ComfyUI. For a manual install, run python -m pip install opencv-python in ComfyUI's Python environment once first - the README requires OpenCV or the pack won't load. That dependency actually earns its keep here, since image and mask handling is exactly what OpenCV is for.

You'll also want the pack's models for the generation itself (SDXL base + refiner, the fp16-fix VAE); the README has the full list with links.

Common issues

Inpainting is where people get stuck, and it's usually the mask, not this node. If nothing changes in your masked area, check that the mask is actually reaching the adapter through the right input - image_mask vs uploaded_mask mixups are common - and that denoise on the sampler side is high enough to let the region change. If the whole image regenerates instead of just the mask, your mode is probably still on image-to-image rather than inpainting.

And the standing Searge rule: pair the latest workflow JSON with the latest nodes. Most "it just errors" reports trace back to a version mismatch, not a real bug.

CategorySearge/UI/Prompting

Inputs (4)

NameTypeDefaultDescription
dataoptSRG_DATA_STREAM
source_imageoptIMAGE
image_maskoptMASK
uploaded_maskoptMASK

Outputs (2)

NameTypeDescription
dataSRG_DATA_STREAM
image_inputsSRG_DATA_STREAM