Nodes/ComfyUI-PolyhedronLoRAStack/⬡ Polyhedron Fast Upscale
ComfyUI Node

⬡ Polyhedron Fast Upscale

Plain resize and model-based upscaling in one node, for IMAGE, VIDEO and MASK together - the mask follows the image instead of drifting out of register. Works through long batches in chunks so a clip does not have to fit in VRAM all at once, and can snap the result to the divisor the samplers downstream expect.

By PolyhedronAI·Created 3 months ago·Updated 17 days ago· 2
⬡ Polyhedron Fast Upscale
  • image
  • video
  • upscale_model
  • mask
  • image
  • video
  • width
  • height
  • mask
size_modefactor
upscale_by2.00
width1024
height1024
resize_methodbicubic
devicegpu
divisible_by16
per_batch32
mute_staging_logstrue
keep_proportionstretch
crop_positioncenter
pad_color0, 0, 0
CategoryPolyhedron/Upscaling

Inputs (16)

NameTypeDefaultDescription
size_modeCOMBOfactorfactor: scale both sides by upscale_by (the Power Upscale way). exact: hit width x height (the Resize-v2 way; a zero side keeps the aspect).
upscale_byFLOAT2.000.05–8factor mode: scale for both sides.
widthINT10240–8192exact mode: target width (0 = derive from height).
heightINT10240–8192exact mode: target height (0 = derive from width).
resize_methodCOMBObicubicbicubic/bilinear/area/nearest run on gpu OR cpu. lanczos is PIL = cpu-only. nvidia_rtx_vsr = Maxine VideoSuperRes (needs nvvfx + RTX; target snaps to /8).
deviceCOMBOgpuWhere the torch resize runs. lanczos refuses gpu (fail loud); nvidia_rtx_vsr always runs on the GPU regardless.
divisible_byINT161–64Snap the target DOWN to a multiple (Wan-friendly default 16).
per_batchINT320–512Frames per sub-batch for ESRGAN + resize (VRAM guard). 0 = whole batch. nvidia_rtx_vsr is per-frame by SDK design.
mute_staging_logsBOOLEANtrueSilence ComfyUI's model staging INFO lines while this node runs (restored byte-exactly after).
keep_proportionCOMBOstretchWhat to do when the aspect ratios differ. stretch = distort to the target (the stretch behaviour). crop = cover the target and cut the overhang. pad = fit inside and fill the rest with pad_color.
crop_positionCOMBOcenterWhere the image sits - used for BOTH the crop cut and the pad placement.
pad_colorSTRING0, 0, 0Fill colour for pad, as R, G, B (0-255). Unparseable = black (fail soft).
imageoptIMAGEFrame input [N,H,W,C]. Wire EXACTLY one of image/video.
videooptVIDEONative VIDEO input; audio + frame rate ride through into the VIDEO output. Wire EXACTLY one of image/video.
upscale_modeloptUPSCALE_MODELOptional ESRGAN pass BEFORE the resize (core spandrel path, sub-batched).
maskoptMASKOptional mask - resized with the SAME geometry (crop/pad included). A padded border is 0: it was never part of the source.

Outputs (5)

NameTypeDescription
imageIMAGE
videoVIDEO
widthINT
heightINT
maskMASK