fix: resolve overlapping group bounding boxes and add README

Group 4/5 and Group 1/2 bounding boxes overlapped, causing nodes to
appear in multiple groups. Muting the Seam Fix group would have also
muted Pass 1 output nodes. Repositioned GenerateSeamMask node and
adjusted all group boundaries to eliminate overlaps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 16:21:11 +01:00
parent db82775382
commit 01b4800fce
2 changed files with 58 additions and 4 deletions

54
README.md Normal file
View File

@@ -0,0 +1,54 @@
# ComfyUI_UltimateSGUpscale
Tiled upscaling for ComfyUI using built-in nodes. Replicates the core features of [UltimateSDUpscale](https://github.com/ssitu/ComfyUI_UltimateSDUpscale) as a transparent workflow you can inspect and modify.
## Requirements
- ComfyUI with `SplitImageToTileList` and `ImageMergeTileList` nodes (added in [PR #12599](https://github.com/comfyanonymous/ComfyUI/pull/12599))
## Installation
Clone into your ComfyUI `custom_nodes` directory:
```bash
cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI_UltimateSGUpscale.git
```
This installs one custom node (`Generate Seam Mask`) and provides an example workflow.
## What's Included
### Example Workflow
`example_workflows/tiled-upscale-builtin-nodes.json` — a two-pass tiled upscaling workflow:
**Pass 1 — Tiled Redraw:** Upscales the image with a model (e.g. 4x-UltraSharp), splits it into overlapping tiles, runs each tile through KSampler, then merges them back with sine-based blending.
**Pass 2 — Seam Fix (optional):** Generates a mask targeting only the seam regions between tiles, then runs a second tiled denoise pass restricted to those seam bands via `SetLatentNoiseMask`. Mute or bypass the "Seam Fix" group to skip this pass.
### Generate Seam Mask Node
A small helper node that creates a binary mask image with white bands at tile seam positions. It replicates `SplitImageToTileList`'s tiling logic to place bands at the exact center of each overlap region.
**Inputs:**
| Parameter | Default | Description |
|-----------|---------|-------------|
| image_width | 2048 | Image width (connect from GetImageSize) |
| image_height | 2048 | Image height (connect from GetImageSize) |
| tile_width | 1024 | Tile width matching Pass 1 |
| tile_height | 1024 | Tile height matching Pass 1 |
| overlap | 128 | Overlap matching Pass 1 |
| seam_width | 64 | Width of seam bands in pixels |
**Output:** `IMAGE` — a mask with white bands at seam positions, black elsewhere.
## How It Works
The workflow chains standard ComfyUI nodes together. `SplitImageToTileList` outputs a list, and ComfyUI's auto-iteration runs all downstream nodes (VAEEncode, KSampler, VAEDecode) once per tile automatically. Scalar inputs (model, conditioning, VAE) are reused across tiles. `ImageMergeTileList` reassembles tiles using sine-weighted blending for smooth overlap transitions.
The seam fix pass uses `SetLatentNoiseMask` to restrict denoising to only the masked seam regions, leaving the rest of the image untouched.
## License
MIT

View File

@@ -235,7 +235,7 @@
{ {
"id": 13, "id": 13,
"type": "GenerateSeamMask", "type": "GenerateSeamMask",
"pos": [2040, 500], "pos": [2370, 650],
"size": [250, 170], "size": [250, 170],
"flags": {}, "flags": {},
"order": 12, "order": 12,
@@ -453,7 +453,7 @@
{ {
"id": 1, "id": 1,
"title": "Load Models", "title": "Load Models",
"bounding": [40, 130, 345, 400], "bounding": [40, 130, 345, 190],
"color": "#3f789e", "color": "#3f789e",
"font_size": 24, "font_size": 24,
"flags": {} "flags": {}
@@ -477,7 +477,7 @@
{ {
"id": 4, "id": 4,
"title": "Pass 1: Tiled Redraw", "title": "Pass 1: Tiled Redraw",
"bounding": [1150, 130, 970, 730], "bounding": [1150, 130, 1200, 730],
"color": "#3a7e3a", "color": "#3a7e3a",
"font_size": 24, "font_size": 24,
"flags": {} "flags": {}
@@ -485,7 +485,7 @@
{ {
"id": 5, "id": 5,
"title": "Pass 2: Seam Fix (bypass/mute to skip)", "title": "Pass 2: Seam Fix (bypass/mute to skip)",
"bounding": [2030, 130, 1800, 600], "bounding": [2360, 130, 1470, 710],
"color": "#7e3a3a", "color": "#7e3a3a",
"font_size": 24, "font_size": 24,
"flags": {} "flags": {}