Tile Compositor (Merge)
The paste-back half of every crop-and-refine loop
- base_image
- processed_tile
- tile_data
- composite_image
The name tells you exactly what it does: this is the node that puts things back. Crop-and-refine is the most reliable trick in the ComfyUI playbook - grab a region, run a fresh sampling pass on it, paste the result where it came from - and Tile Compositor (Merge) is the third step. You'll recognize the pattern from Impact Pack's FaceDetailer, which made "detect, crop, resample, paste back" the standard practice. The difference here: instead of a detector finding the region, you pick it, and this node remembers where it was.
What makes it work is the pack's shared TILE_DATA contract. A crop source (usually this pack's Visual Marquee) hands you a crop and a little blob of metadata recording where that crop came from and what size it was. Tile Compositor reads that metadata and does the paste-back, so you never have to touch coordinates by hand.
How it works
Under the hood it's a masked blend, not a naive pixel copy. The node reads original_bbox (x, y, width, height) out of the tile_data, then:
- Auto-resizes the tile. If your processed tile doesn't match the crop dimensions (it usually won't after a latent/img2img pass), it Lanczos-upscales or downscales it to fit. No manual dimension matching.
- Builds a soft mask. It creates a mask over the region and blurs its edges with an average pool whose radius is your
feathervalue, so the tile blends into the background instead of having a hard rectangular border. - Composites. Merges the tile over the original image using that feathered mask, clipping everything to image bounds so you can't paste off-canvas.
One behavior worth knowing: if the tile_data you feed it is missing or invalid, it silently returns the base image unchanged. No error, no fanfare - the graph just does nothing. That's the safety valve, but it's also how a wrong wiring sneaks past you.
The inputs that matter
Only four, and three of them are obvious:
- base_image - the original image the tile came from.
- processed_tile - the result of whatever you did to the crop (sampler output, img2img pass, upscale).
- tile_data - the metadata from the crop source. Wire it straight from Visual Marquee (or anything else that emits the pack's
TILE_DATA). - feather (default 16, range 0–100) - the only knob you'll actually tune.
0gives a hard seam, which you almost never want. 16 is a sensible starting blur; crank toward 100 for a very soft fade, and keep in mind very high values will visibly ghost the edge over detail in the background.
The single output, composite_image, is the original image with the processed tile blended in - exactly what you'd send to a Save Image node.
Getting it installed
It ships in the ComfyUI-Flow-Assistor pack, so install is pack-wide:
cd ComfyUI/custom_nodes
git clone https://github.com/Merserk/ComfyUI-Flow-Assistor.git
Then restart ComfyUI. Or search "Flow-Assistor" in ComfyUI Manager and hit install. The pack is V3-only (needs a current ComfyUI build with the comfy_api.latest API and Python 3.10+), has zero extra pip dependencies, and needs no model downloads for this node.
Common gotchas
The feather is where people get burned: at 0 the seam is ugly, but slamming it to 100 on a high-res composite gives you a soft, smeared halo. Start at the default and move it in small steps. The other trap is feeding it a stale or foreign tile_data - remember the silent-passthrough behavior, so check that your crop source is actually connected if your "edited" image comes back looking untouched.
It pairs with Visual Marquee (pick region → process → paste back), and if you're just sketching a graph without an interactive step in the way, the pack's Tile Manager can stand in as a dummy crop source that keeps the wiring valid.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | The original image. | |
| processed_tile | IMAGE | The result from the sampler. | |
| tile_data | TILE_DATA | — | |
| featheropt | INT | 160–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| composite_image | IMAGE | — |