Nodes/ComfyUI · Egregora: Divide & Enhance/✂️ Egregora Divide Select
ComfyUI Node

✂️ Egregora Divide Select

The splitter that hands you tiles and the masks to stitch them

By lucasgattas·Created about a year ago·Updated 5 months ago· 3
✂️ Egregora Divide Select
  • image
  • egregora_data
  • TILE(S)
  • MASK(S)
tile0
blend_px48
feather_curvesmootherstep
mask_warp_strength1.0
mask_warp_frequency1.0

Every tiled upscaling workflow has a moment where the image comes apart and you have to trust it'll go back together. Egregora Divide Select is that moment made explicit: it takes the plan from Egregora Algorithm, crops out the padded tiles, and generates the seam-aware masks that will later decide exactly how those tiles re-merge. You feed it the working canvas, and you get back two list outputs - TILE(S) and MASK(S) - that are guaranteed to line up with each other and with the Combine node.

If you've used Ultimate SD Upscale or Tiled Diffusion, you know the shape of this: split, process each chunk, blend the seams. Where Egregora differs is that the blend isn't an afterthought. Each tile gets an owner region (its home turf) plus a padding band of context, and the mask only carries weight in that band. The center of each tile is owned outright; the edges fade out with a controllable feather curve. That's the mechanism behind "fewer visible seams" - neighbors only ever compete in a narrow, deliberately-shaped strip, not over whole overlapping windows.

The inputs

  • image - the upscaled IMAGE from Egregora Algorithm. This is the one everyone trips on: feed it your original image and the crops won't match the plan's coordinates.
  • egregora_data - the plan from Algorithm. Non-negotiable; without it there are no tile boxes.
  • tile (0) - the selector. 0 returns all tiles and masks; any positive number returns just that one (it's 1-based, so 1 is the first tile). Handy for processing a single problem region or testing one tile without burning VRAM on the rest.
  • blend_px (48) - width of the transition band around each owner region. Wider = softer, longer blends; narrower = stricter ownership and more visible edges.
  • feather_curve - linear, smoothstep, smootherstep, or cosine. The README calls smootherstep the best default starting point.
  • mask_warp_strength (1.0) and mask_warp_frequency (1.0) - this is the nice trick. The mask boundaries get a gentle, deterministic sine-based warp so the seam isn't a perfect straight line. Ruler edges are what make tiled upscales look artificial; a touch of warp breaks that up. Small values first.

What comes out and where it goes

Both outputs are lists. The TILE(S) are your processing input - wire them into whatever enhancement you run per tile, typically VAEEncode → KSampler → VAEDecode with a prompt and a ControlNet Tile if you want the detail pass to stay faithful to the source. The MASK(S) are the contract for Combine: they define exactly how each processed tile gets pasted back. Keep them wired through your processing and straight into Combine, untouched.

Install

# ComfyUI Manager: search "Egregora" (pack title "ComfyUI · Egregora: Divide & Enhance")

# or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/lucasgattas/ComfyUI-Egregora-Divide-And-Enhance.git

Restart ComfyUI after cloning. No requirements.txt, no model downloads - it's plain torch, so install is as painless as it gets. GPL-3.0.

Gotchas

The setting-sync trap is the real one. Combine reuses the masks you give it - it never rebuilds them. So the blend_px, feather_curve, and warp values you set here are the ones that end up in your final image, and there's no knob on Combine that can change them after the fact. Want softer seams? Re-run Divide Select with a bigger blend_px and re-process. Also keep this node's settings identical to anything you preview with Egregora Debug Mask, or your "preview" won't match your output. And if you select a single tile here, Combine will only place that one tile - it composes whatever list it receives.

CategoryEgregora/Core

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
egregora_dataEGREGORA_DATA
tileINT0
blend_pxINT480–1024
feather_curveCOMBOsmootherstep4 options: linear, smoothstep, smootherstep, cosine
mask_warp_strengthFLOAT1.00–16
mask_warp_frequencyFLOAT1.00.1–8

Outputs (2)

NameTypeDescription
TILE(S)IMAGE
MASK(S)MASK