BMAB Normalize Size
Snap a width/height pair to a target scale
- width
- height
A small utility node with a narrow job: take a width and height, plus a target normalize value, and hand back a corrected width/height pair. It's the kind of node you don't build a workflow around so much as drop in wherever you need a dimension pair cleaned up before it hits a sampler, a resize node, or anything else downstream that's picky about exact values.
What it takes and gives back
Three required inputs, all plain integers on the same 256-2048 range in steps of 8 (the step size ComfyUI generation dimensions conventionally use, since most models want dimensions divisible by 8):
width(default 512) andheight(default 768) - your starting dimensions.normalize(default 768) - the target value the node uses to correct them.
Outputs are two plain INT values, width and height - the corrected pair, ready to wire into whatever else in your graph wants a width and a height. This node is also marked as an output node, meaning it can display its result directly in the ComfyUI interface as well as feed it forward to other nodes - useful for sanity-checking the numbers a more complex chain upstream is actually producing before they hit an expensive sampling step.
The README doesn't spell out the exact normalization formula, and it's not something worth guessing at precisely - the safe way to understand it is functionally: give it your intended size and a target, and trust the pair that comes back to be generation-safe dimensions scaled sensibly toward that target, rather than working out the exact math by hand.
Where it's actually useful
This kind of node earns its keep in workflows where width and height get computed dynamically - say, derived from an input image's own dimensions, or from a ratio calculation somewhere else in the graph - rather than typed in by hand. Computed dimensions have a way of landing on values that aren't divisible by 8, or that drift wildly from what you actually intended once a few resize and crop operations have chained together. Routing the pair through Normalize Size before it reaches a sampler or a VAE encode is a cheap way to catch that before it becomes an error or a subtly wrong output size.
Installing it
ComfyUI Manager: search comfyui_bmab, install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/portu-sim/comfyui_bmab.git
cd comfyui_bmab
pip install -r requirements.txt
The README also asks for comfyui_controlnet_aux and ComfyUI_IPAdapter_plus installed alongside comfyui_bmab - "a total of three custom nodes" for the pack as a whole - though this specific utility node has no dependency on either.
The one thing worth checking
If you drop this node in and the output dimensions look identical to your input, that's not necessarily broken - it likely means your input pair was already close enough to whatever normalize implies that no real correction was needed. Don't assume the node is a no-op; check what happens when you deliberately feed it a mismatched pair (say, width=2000, height=300) before concluding it isn't doing anything on your actual data.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 512256–2048 | — |
| height | INT | 768256–2048 | — |
| normalize | INT | 768256–2048 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |