ComfyUI Node

Hildegard Combine

The seam-killer — how Hildegard stitches tiles back without patchwork

By 42lux·Created 3 months ago·Updated 3 months ago· 57
Hildegard Combine
  • images
  • dac_data
  • image

Hildegard Combine is the last node in the pipeline and the one you'll never think about again once it works - which is exactly the job. Your sampler has just run Klein on a stack of tiles, each one glowing with freshly invented detail, and they need to become one seamless image again. Combine takes the list of processed tiles and the grid geometry from Plan, and stitches them with feathered masks so the seams vanish instead of showing up as hard gridded lines.

The reason this is worth a node of its own rather than a generic "paste images in a grid": the tiles overlap, and naive compositing doubles up the overlap regions until every seam glows. Combine exists to make the overlap disappear. It's pure compositing - torch and PIL, no model, no sampling - so it's the cheap part of the workflow and the only node in the pack that doesn't care about your VRAM.

How it works

Each tile is placed back at the exact coordinates it was cut from (that's what the dac_data geometry is for - same coordinate system as References Split, so everything lands where it came from). Per tile, it builds an alpha mask that's solid in the interior and zero in an overlap/4-wide strip on every side that borders a neighbor. That mask is then blurred - Gaussian at normal overlaps, box blur when the overlap is narrow (≤64px) - so each tile fades into its neighbors instead of ending in a hard cut. Sides that touch the actual canvas border are left hard-edged, because there's nothing to blend with there. The result: smooth feathering where tiles meet, crisp edges at the frame.

The overlap/4 strip is the interesting detail. Because the tiles overlap by a full min_overlap fraction, the feather only needs a quarter of that to hide the transition - which is why seams stay invisible even at the moderate overlap the example workflow runs (1/4 tile).

Inputs and output

Two inputs: images - the list of processed tiles straight out of your sampler - and dac_data from Hildegard Plan, which carries the grid, overlaps, and ordering. One output: image, the stitched result, which you run through VAEDecode and SaveImage like any other image.

Install

Same as the rest of the pack - ComfyUI Manager (search "ComfyUI-42lux-Hildegard-Refiner") or:

cd ComfyUI/custom_nodes
git clone https://github.com/42lux/ComfyUI-42lux-Hildegard-Refiner

Then restart ComfyUI. No pip dependencies. The pack's real requirement is the Hildegard LoRA from huggingface.co/42lux/hildegard loaded before sampling - though Combine itself will happily stitch whatever tiles you give it, LoRA or not.

Gotchas

Order is load-bearing. Combine places tiles by grid coordinates, but it reads them in the same spiral/linear order the pack uses - if your tiles come out of order, the image will look scrambled, not smeary. Keep the sampler feeding tiles straight from References Split in sequence.

Seams can still appear if you push creativity hard. The author's own workflow note: if you lower the LoRA strength or ref weights for more freedom, you may see seams - the counter is activating the color anchor node. Same for color drift between tiles (a real Klein habit - it loves adding red): run Flux2KleinColorAnchor and the tiles stop fighting each other's white balance. And if a tile ever looks misaligned, check that dac_data flowing into Combine matches the one that built the tiles - mixing plans from two different runs is the fastest way to get a mosaic that refuses to line up.

Categoryupscale/hildegard-refiner

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
dac_dataHILDEGARD_DATA

Outputs (1)

NameTypeDescription
imageIMAGE