Smart Upscale Calculator

AIXPOLY_SmartUpscaleCalculator

Detects input image dimensions and calculates target width, height, and upscale factor for the target resolution (1k/2k/4k). Preserves aspect ratio. Scale capped at 4x. Outputs needs_upscale=True if scale > 1.

Pack: ComfyUI-PBRFusion4

custom_nodes.COMFYUI-PBRFusion4

Inputs (2)

NameTypeRequired
imageIMAGErequired
target_resolutionCOMBOrequired

Outputs (4)

NameType
widthINT
heightINT
scale_factorFLOAT
needs_upscaleBOOLEAN