Nodes/ComfyUI-ArchAi3d-Qwen/๐Ÿ”ง USDU Edge Repair
ComfyUI Node

๐Ÿ”ง USDU Edge Repair

The tiled upscaler with a dedicated pass for fixing seams at tile edges

By amir84ferdosยทCreated 11 months agoยทUpdated 5 months agoยท 70
๐Ÿ”ง USDU Edge Repair
  • upscaled_image
  • model
  • conditionings
  • negative
  • vae
  • denoise_mask
  • model_patch
  • control_image
  • control_mask
  • image
  • tiles_original
  • tiles_padded
  • tiles_blend_mask
  • tiles_edge_mask
  • tiles_processed
  • debug_info
โ—„output_width1024โ–บ
โ—„output_height1024โ–บ
โ—„tiles_x2โ–บ
โ—„tiles_y2โ–บ
โ—„safe_guardtrueโ–บ
โ—„enable_diffdifftrueโ–บ
โ—„enable_controlnettrueโ–บ
โ—„preview_modefalseโ–บ
โ—„seed0โ–บ
โ—„steps20โ–บ
โ—„cfg8.00โ–บ
โ—„sampler_nameโ–พโ–บ
โ—„schedulerโ–พโ–บ
โ—„denoise0.20โ–บ
โ—„mode_typeโ–พโ–บ
โ—„tile_width512โ–บ
โ—„tile_height512โ–บ
โ—„mask_blur8โ–บ
โ—„tile_padding32โ–บ
โ—„edge_mask_width20โ–บ
โ—„edge_mask_feather8โ–บ
โ—„use_edge_mask_diffdifffalseโ–บ
โ—„seam_fix_modeโ–พโ–บ
โ—„seam_fix_denoise1.00โ–บ
โ—„seam_fix_width64โ–บ
โ—„seam_fix_mask_blur8โ–บ
โ—„seam_fix_padding16โ–บ
โ—„tiled_decodefalseโ–บ
โ—„multiplier1.000โ–บ
โ—„control_strength1.00โ–บ

Seams are the chronic disease of tiled upscaling. Each tile is an independent img2img pass, and where they meet, colors and contrast drift - you see a grid instead of an image. The USDU family already has seam-fix modes, but this node goes one step further: it builds a dedicated edge mask for the boundaries between tiles and feeds it back into the differential-diffusion pass, so tile edges get blended toward smoothness during sampling rather than patched afterwards.

The source layout says a lot - usdu_edge_repair is a self-contained subpackage with its own geometry module, preview module, and diffdiff module. The author is treating seam handling as its own engineering problem, and it shows in the interface: edge_mask_width (default 20px), edge_mask_feather (default 8px), and use_edge_mask_diffdiff (default False) - the switch that actually applies the edge mask to the diffdiff pass for smoother blending.

The workflow

It's a solver-driven (No Upscale) node: upscaled_image + output_width/output_height/tiles_x/tiles_y from the Smart Tile Solver, safe_guard validation, enable_diffdiff/enable_controlnet toggles, per-tile conditionings, sampler block, mode_type, tile size/padding/blur, standard seam-fix block, tiled_decode. Optional: denoise_mask, multiplier, model_patch, control_image, control_strength, control_mask.

Two things set it apart. First, preview_mode (default False) - flip it on and instead of a final image you get the intermediate tiles and masks out, which is how you debug where a seam is coming from. Second, the output array is the richest in the family: image, tiles_original, tiles_padded, tiles_blend_mask, tiles_edge_mask, tiles_processed, and debug_info. If a seam survives your current settings, tiles_edge_mask will show you whether the mask is actually covering the boundary.

Installing it

One of ~100 nodes in ComfyUI-ArchAi3d-Qwen by Amir Ferdos (ArchAi3d). ComfyUI Manager โ†’ search "ArchAi3d Qwen" โ†’ install โ†’ restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt

Restart. Needs only ComfyUI's bundled torch/numpy/Pillow; the heavy deps in requirements.txt serve other pack nodes. Free for personal use; commercial use needs the paid license.

The traps

use_edge_mask_diffdiff defaults to False - the headline feature is off until you turn it on, so a first run without toggling it is just another Universal V2-class upscaler. And it inherits the family rules: solver values in, raw source out, safe_guard on during setup, conditioning count matching the tile count. Start with preview_mode on for a stubborn seam so you can see the edge mask before you spend a render trusting it.

CategoryArchAi3d/Upscaling/USDU

Inputs (39)

NameTypeDefaultDescription
upscaled_imageIMAGEPre-upscaled image from Matrix Search
output_widthINT102464โ€“8192โ€”
output_heightINT102464โ€“8192โ€”
tiles_xINT21โ€“64โ€”
tiles_yINT21โ€“64โ€”
safe_guardBOOLEANtrueโ€”
enable_diffdiffBOOLEANtrueโ€”
enable_controlnetBOOLEANtrueโ€”
preview_modeBOOLEANfalsePreview mode: Output tile images + masks for verification
modelMODELโ€”
conditioningsCONDITIONING_LISTโ€”
negativeCONDITIONINGโ€”
vaeVAEโ€”
seedINT00โ€“18446744073709550000โ€”
stepsINT201โ€“10000โ€”
cfgFLOAT8.000โ€“100โ€”
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT0.200โ€“1โ€”
mode_typeCOMBO3 options: Linear, Chess, None
tile_widthINT51264โ€“8192โ€”
tile_heightINT51264โ€“8192โ€”
mask_blurINT80โ€“64โ€”
tile_paddingINT320โ€“8192โ€”
edge_mask_widthINT200โ€“128โ€”
edge_mask_featherINT80โ€“64โ€”
use_edge_mask_diffdiffBOOLEANfalseApply edge mask to DiffDiff for smoother tile blending
seam_fix_modeCOMBO4 options: None, Band Pass, Half Tile, Half Tile + Intersections
seam_fix_denoiseFLOAT1.000โ€“1โ€”
seam_fix_widthINT640โ€“8192โ€”
seam_fix_mask_blurINT80โ€“64โ€”
seam_fix_paddingINT160โ€“8192โ€”
tiled_decodeBOOLEANfalseโ€”
denoise_maskoptMASKOptional mask for per-pixel denoise
multiplieroptFLOAT1.000-10โ€“10โ€”
model_patchoptMODEL_PATCHControlNet patch
control_imageoptIMAGEControl image for ControlNet
control_strengthoptFLOAT1.00-10โ€“10โ€”
control_maskoptMASKOptional mask for ControlNet

Outputs (7)

NameTypeDescription
imageIMAGEโ€”
tiles_originalIMAGEโ€”
tiles_paddedIMAGEโ€”
tiles_blend_maskIMAGEโ€”
tiles_edge_maskIMAGEโ€”
tiles_processedIMAGEโ€”
debug_infoSTRINGโ€”