Nodes/ComfyUI-PBRFusion4/Smart Upscale Calculator
ComfyUI Node

Smart Upscale Calculator

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.

By Night1099·Created 6 months ago·Updated 3 months ago· 15
Smart Upscale Calculator
  • image
  • width
  • height
  • scale_factor
  • needs_upscale
target_resolution2k
CategoryPBRFUSION4/Utils

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
target_resolutionCOMBO2k3 options: 1k, 2k, 4k

Outputs (4)

NameTypeDescription
widthINT
heightINT
scale_factorFLOAT
needs_upscaleBOOLEAN