Simple Blend Mask
The node that decides whether your tiled upscale has seams
- blend_mask
- blend_mask_rgb
Tiled upscaling has exactly one failure mode that matters: the seams. You slice a big image into tiles, run diffusion on each one, and when you stitch them back the overlap regions look like a patchwork quilt - dark X's at corners, a visible grid. Blend masks are how you stop that, and this node makes one for a single tile.
This comes from ComfyUI-ArchAi3d-Qwen, Amir Ferdos's pack (he's an architect who's been building ComfyUI nodes since 2023, mostly Qwen-VL editing for interior design). The node lives in the pack's "Simple USDU" subsystem - a from-scratch, self-contained tiled-upscaling pipeline modeled on Ultimate SD Upscale, which the pack README barely mentions. The tooltips and this node's source are the real docs.
How it works
The idea is a weighted blend: each tile contributes most where it's the only thing covering the image, and fades out where its neighbor takes over. This node outputs a mask per tile where white (1.0) means "this tile contributes fully" and black (0.0) means "nothing here", with a gradient in between.
The clever bit is what's called distance-based masking. Instead of drawing a simple border, the node measures each pixel's distance to the nearest internal edge - an edge where the tile actually has a neighbor. Edges at the image boundary stay sharp white because there's nobody to blend with. That detail is what fixes the classic "diagonal dark corner" artifact, where corner pixels get double-faded and the output ends up darker where four tiles meet.
Inputs that matter
Most of these describe your tile grid, and they have to match what you told the Cropper and Sampler:
- tile_idx - which tile this mask is for (0-indexed, left-to-right then top-to-bottom).
- tile_width / tile_height / tiles_x / tiles_y - tile size and grid dimensions.
- overlap - the padding between tiles. The tooltip notes it's the same as tile_padding.
- mask_blur - the gradient width in pixels. 16 is a sane start; more = wider blend zone, but too wide and edges get mushy.
Outputs are blend_mask (a MASK, wire this into the Compositor's blend_masks input) and blend_mask_rgb (an IMAGE preview so you can actually see what the mask looks like before you commit).
Installing it
The pack installs the standard way:
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt
# restart ComfyUI
Or use ComfyUI Manager and search "ArchAi3d Qwen". The tile nodes only need numpy/Pillow/torch, which ComfyUI already ships, so the long requirements list is mostly for the pack's other nodes. No models to download here - you're generating the mask yourself.
Where it fits
The Simple USDU chain is Cropper → Sampler → Compositor, with this node feeding the compositor. If you have a 4×4 grid, you'd make 16 of these (or use the Batch sibling). One honest caveat: if you're not deliberately building your own pipeline to learn how tiled upscaling works, Impact Pack's UltimateSDUpscale does all of this in one node. This suite is for people who want the pieces - and for that, this mask generator is the right first piece.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| tile_idx | INT | 00–1000 | — |
| tile_width | INT | 51264–4096 | — |
| tile_height | INT | 51264–4096 | — |
| tiles_x | INT | 21–100 | — |
| tiles_y | INT | 21–100 | — |
| overlap | INT | 640–512 | Overlap between tiles (same as tile_padding) |
| mask_blur | INT | 160–256 | Gradient width in pixels (blend zone) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| blend_mask | MASK | — |
| blend_mask_rgb | IMAGE | — |