π Egregora Algorithm
The tile planner that makes tiled upscaling behave
- image
- IMAGE
- egregora_data
Tiled upscaling has one dirty secret: the seams. You split a big image into chunks so your GPU doesn't OOM, run an enhancement pass on each chunk, and the reassembly shows exactly where the tiles were, in ruler-straight lines. Egregora Algorithm is the first node in the Egregora: Divide & Enhance pack, and it's where that problem gets solved - or avoided, if you set it up right.
Its job is planning, not processing. Feed it your source image and it computes a working resolution, carves the canvas into a deterministic grid of "owner" regions, and expands each tile with context padding so the model sees its neighbors. Everything downstream - the tiles you process, the masks you blend with, the final combine - uses this one plan. That single source of truth is the pack's whole bet: split and merge can't drift apart if they both read the same blueprint.
How it works
The mechanics are worth understanding because they're what make this different from naive tiling. First the image is resized so its long side is min_scale_factorΓ the original (2Γ by default). Then it's split into a grid where each tile owns a base region around tile_resolution pixels, and the only overlap between neighbors is the padding_px band of context. There's no semantic tug-of-war over shared territory - every tile has a home turf, and the padding just gives the model room to see what's coming next.
Two outputs leave this node:
- IMAGE - the upscaled working canvas. This is what Divide Select crops tiles from. Not your final image; that's Combine's job.
- EGREGORA_DATA - the plan itself: every tile's base region, padding box, grid position, and processing order, all packed into a custom type you route to the other three nodes in the pack.
The inputs that matter
- tile_resolution (1024) - base size of each tile's owned region. Bigger means fewer tiles, more VRAM, better consistency. Smaller means the opposite.
- padding_px (128) - context padding around each tile. The README's own testing found 192 a noticeably stronger starting point for seam quality, so try that before touching anything else.
- min_scale_factor (2) - how much the working canvas is upscaled before tiling. If you're going to process tiles anyway, let the pack do the initial scale-up.
- tile_order -
linear,spiral_outward,spiral_inward, orserpentine. Changes which tile lands on the canvas first, which matters because Combine's conflict logic reacts to what's already been pasted. - scaling_method -
lanczosis the default and fine.
That's the whole required list. No models, no hidden dependencies, no API - pure torch math.
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
Then restart ComfyUI. The repo ships no requirements.txt and needs no model downloads - it's all tensor ops, so there's nothing to go wrong at install time. It's GPL-3.0.
Gotchas
Where people get burned: the IMAGE that leaves this node is the one to feed Divide Select, not your original. The plan is computed against the upscaled canvas; a mismatched input produces tiles that don't line up with their boxes, and you'll wonder why your seams look like a jigsaw puzzle. Also, change any of these inputs and the plan changes - re-run the whole chain, and don't feed Combine tiles made from an older plan.
The README is upfront that the implementation changed substantially between versions, and old workflows may need their nodes recreated after an update. If a saved workflow comes back with a red Egregora node, that's why.
Egregora is a young pack from lucasgattas (Comfy Registry handle mrgattax), the same author behind the well-received Adaptive-Colorfix node - and yes, he's built it to pair with these tiling nodes. Small ecosystem, active author, zero extra install weight. Worth a try the next time a big image refuses to fit on your card.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| tile_resolution | INT | 102464β8192 | β |
| padding_px | INT | 1280β2048 | β |
| min_scale_factor | FLOAT | 2.01β16 | β |
| tile_order | COMBO | linear | 4 options: linear, spiral_outward, spiral_inward, serpentine |
| scaling_method | COMBO | lanczos | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| egregora_data | EGREGORA_DATA | β |