ComfyUI Node
Pixel Constrained Scaler
A ComfyUI node in image/resolution with 6 inputs and 5 outputs.
Pixel Constrained Scaler
- image
- image_passthrough
- constrained_width
- constrained_height
- constrained_aspect_ratio
- original_aspect_ratio
◄min_res256►
◄max_res2048►
◄max_megapixels2.4►
◄scaling_factor1.5►
◄multiple_of8►
Categoryimage/resolution
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to analyze for resolution constraints | |
| min_res | INT | 256 | Minimum allowed dimension (width/height) in pixels |
| max_res | INT | 2048256–8192 | Maximum allowed dimension (width/height) in pixels |
| max_megapixels | FLOAT | 2.4 | Maximum allowed resolution in megapixels (e.g., 2.3 = 2.3 million pixels) |
| scaling_factor | FLOAT | 1.50.1–4 | Additional scaling factor (1.0 = no change, 2.0 = double size). Megapixel limit takes priority when original image is larger than the cap. |
| multiple_of | INT | 8 | Ensure dimensions are multiples of this number (8, 64, etc) |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image_passthrough | IMAGE | — |
| constrained_width | INT | — |
| constrained_height | INT | — |
| constrained_aspect_ratio | FLOAT | — |
| original_aspect_ratio | FLOAT | — |