Gen2 Seam Merger
Compositing regenerated seam strips without new artifacts
- merged_image
- seam_layout
- processed_seam_tiles_list
- seam_tiles_masks_list
- final_image
The second half of the two-pass seam-fix workflow. Gen2 Seam Fix carved out the seam strips and you regenerated them; this node composites those regenerated seam tiles back onto the first-pass merged image. Where the first-pass Tile Merger has to blend two independently-sampled images that disagree, this one is doing a much safer job: each seam tile's non-strip region equals the canvas content already, so there's nothing to reconcile - you're pasting strips that line up with what's there. That's why its blend modes are simpler and why multi_band is actually safe here (no low-frequency disagreement to ring on).
Inputs
Required:
merged_image- the first-pass merged result you're fixing.seam_layout- theGEN2_SEAM_LAYOUTfrom Gen2 Seam Fix.blend_mode-linear,gaussian(default), ormulti_band.blend_strength- 0–1, default 0.5. Formulti_bandthis controls pyramid depth (0 → 1 level, 1 → 6 levels).histogram_matching- boolean, default off.
Optional:
processed_seam_tiles_list- your regenerated seam tiles (IMAGE).seam_tiles_masks_list- the strip masks (MASK), from Seam Fix.
Output: final_image.
What each mode does
linear/gaussian- a straight alpha composite:final = merged·(1−mask) + seam·mask. On non-overlapping seam tiles both modes are mathematically identical, so the two names exist mainly for symmetry with the Tile Merger.gaussianis the default and a fine one.multi_band- Laplacian-pyramid blend per seam tile against the canvas. Safe here, as noted, because the seam tile's non-strip region equals the canvas content - so the pyramid only smooths the strip boundary itself.blend_strengthcontrols how many pyramid levels it builds.
histogram_matching does a Reinhard mean/std color transfer of each seam tile's strip region to match the surrounding (non-strip) merged content. Turn it on when your regenerated strips come back with a color cast that doesn't match the existing canvas - a real failure mode when strips are sampled separately from the tiles around them.
Wiring the full pipeline
Pass 1 (normal tiling): Splitter → Tile Masks → sampler → Tile Merger → merged_image. Pass 2: feed original_image + merged_image + tile_layout into Seam Fix, sample the seam_tiles, then Seam Merger with merged_image + seam_layout + the processed tiles and masks → final_image. Same mesh topology as the README's diagram, and it's the pattern to run when the first pass leaves ghosting at the seam lines.
Installation
Via ComfyUI Manager (search "ComfyUI-gen2"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/petmycat/ComfyUI-gen2
cd ComfyUI-gen2
pip install -r requirements.txt
Requires scipy (in requirements.txt) like the rest of the tiling section. Restart after installing.
Common issues
- Seam tiles not blending, hard edges. If you didn't wire in the
seam_tiles_masks_list, the merger has no masks to feather with - it expects them from Seam Fix. multi_bandlooks worse thanlinear. If your strips genuinely disagree with the canvas (e.g. you ran a high denoise and the strip wandered), the pyramid can't fix disagreement - that's the job ofhistogram_matchingand a lower denoise, not the blend mode.- Color cast on the strips.
histogram_matching = Trueis the targeted fix.
Keep it simple: gaussian by default, add histogram matching when strips drift in color, and only reach for multi_band when a subtle seam texture persists after the first two. The whole two-pass system is the difference between tiled output you accept and tiled output you'd show someone.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| merged_image | IMAGE | — | |
| seam_layout | GEN2_SEAM_LAYOUT | — | |
| blend_mode | COMBO | gaussian | 3 options: linear, gaussian, multi_band |
| blend_strength | FLOAT | 0.500–1 | — |
| histogram_matching | BOOLEAN | false | — |
| processed_seam_tiles_listopt | IMAGE | — | |
| seam_tiles_masks_listopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| final_image | IMAGE | — |