Pixels W/H Norm(pixels)
Pixels W/H Norm is a pure logic/utility node that normalizes a resolution into final pixel dimensions.
pixels
Description
Pixels W/H Norm is a pure logic/utility node that normalizes a resolution into final pixel dimensions. It takes a base resolution from the resolution combo or from the width/height number fields, applies a scale multiplier, and can swap the axes with flip_w/h. The resulting width and height are returned as INT values, with three additional ANYTYPE outputs for flexible downstream wiring.
Inputs
resolution
- Type:
COMBO, required
Selects the base resolution preset. The available presets are supplied by the node's dropdown. Choosing a fixed preset uses that preset's width and height as the starting point; choosing a custom/manual option lets the width and height fields define the base size.
width
- Type:
INT, required - Default:
512 - Minimum:
64 - Step:
8
The base width in pixels. Values are stepped by 8 in the UI, keeping dimensions aligned with common ComfyUI/latent-friendly multiples of 8.
height
- Type:
INT, required - Default:
512 - Minimum:
64 - Step:
8
The base height in pixels, analogous to width.
scale
- Type:
FLOAT, required - Default:
2 - Range:
0.001to10 - Step:
0.001
Multiplies both width and height after the base resolution is determined. At the default scale of 2, a 512×512 base becomes 1024×1024. Values below 1 downscale; values above 1 upscale.
flip_w/h
- Type:
BOOLEAN, required - Default:
false
When enabled, swaps the normalized width and height after scaling. This is useful for converting a landscape orientation to portrait, or vice versa.
Outputs
- Output 1 (
INT): The normalized width in pixels after resolution selection, scaling, and optional flipping. - Output 2 (
INT): The normalized height in pixels after resolution selection, scaling, and optional flipping. - Outputs 3–5 (
ANYTYPE
Comments
Sign in with GitHub to join the discussion.