Size Parser
The glue node that turns \"1024x1536\" into two numbers
- sdxl_width
- sdxl_height
- wan_width
- wan_height
Size Parser is the least glamorous node in the ComfyUI Smart Scaler pack and, once you're building real workflows, one of the most useful. It does exactly one thing: takes a size string like "1024x1536" and splits it into two integers, 1024 and 1536. That's it. No image in, no image out. It's pure plumbing.
Why this exists. The scaling nodes in this pack (Smart Aspect Scaler, Wan Video Frame Scaler, Batch Frame Processor) deliberately output their result size as a string - scaled_wan_size, scaled_size - because a string is easy to read and easy to pass around. But most things you actually wire into want numbers: EmptyLatentImage wants integer width and height, and Wan sampler setups typically want explicit width/height integers for the latent. Size Parser is the adapter between the two, so your workflow can take a scaled image's size and feed it straight into the generation stage without you typing anything.
How it works
The node takes two required string inputs - sdxl_size and wan_size - both marked as connection-only (you can't just type into them; they have to come from a wire). It splits each on the "x", converts both halves to integers, and outputs them as four INT values: sdxl_width, sdxl_height, wan_width, wan_height. It parses both inputs in one go, which is the point: in a "Both" SDXL + Wan workflow you get all four dimensions out of a single node.
The one behavior to know: if a string is "N/A" (what Smart Aspect Scaler outputs when you only target one model) or anything else it can't parse, the node silently falls back to 0 rather than erroring. So if you see zeros where you expected numbers, you've almost certainly fed it a string that wasn't a real size - check that you didn't connect a scaled_*_size from a disabled output.
Where it fits
The canonical chain from the pack's README: Smart Aspect Scaler or Wan Video Frame Scaler scales the image and outputs a size string → Size Parser → integer width/height → EmptyLatentImage or the Wan pipeline's width/height inputs. You can also feed it the string outputs of Dynamic Resolution Selector, which is the pack's way of hardcoding your own resolutions as text. Either way, Size Parser is what turns the string world back into the number world.
Installation
Same pack install as the rest of the Smart Scaler nodes - ComfyUI Manager search comfyui-smart-scaler, or:
cd ComfyUI/custom_nodes
git clone https://github.com/babydjac/comfyui-smart-scaler.git
pip install torch Pillow numpy
Restart ComfyUI and it's under SmartScaler in the node menu. No extra dependencies beyond torch/Pillow/numpy, no models to download.
Common issues
Honestly, there's not much to break here. The 0 fallback is the only real foot-gun, and it's a visible one. If your latent comes out with width 0, you'll know immediately. One minor gotcha if you're building a custom workflow: both inputs are technically required in the node definition, so ComfyUI wants something wired into each - if you only care about the Wan size, you can't just leave sdxl_size dangling. Feed it any size string or set it up with a text node; the parse is independent, so a useless string on one side doesn't hurt the other.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| sdxl_size | STRING | — | |
| wan_size | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| sdxl_width | INT | — |
| sdxl_height | INT | — |
| wan_width | INT | — |
| wan_height | INT | — |