Latent Size to Number
Read a latent's width and height as usable numbers
Latent Size to Number reads the spatial dimensions of a LATENT tensor and hands them back as plain numbers - width and height - that you can actually use elsewhere in your graph. It sounds trivial, and mechanically it is, but it solves a real problem: without it, the dimensions of your latent are just baked into the graph as whatever you typed into your Empty Latent Image node, invisible to anything downstream that might need to know them.
Why you'd want this
Say you're building a workflow where a control image, a mask, or a second image input needs to match the resolution of your current latent - maybe you're upscaling, maybe you're compositing, maybe you're feeding something into a resize node. Instead of hardcoding "1024x1024" in two places and hoping you remember to update both if you change your generation resolution, you pull the actual width and height straight off the latent with this node and wire those numbers into whatever needs them. Change your resolution once, upstream, and everything downstream that reads from this node follows automatically.
Its sibling is Image Size to Number, doing the identical job for an IMAGE instead of a LATENT - if you're working with pixel-space dimensions rather than latent-space ones, that's the one you want. Note the two aren't interchangeable numerically: a standard SD-family VAE works at 8x spatial compression, so a 1024x1024 image corresponds to a 128x128 latent - Latent Size to Number gives you the latent-space numbers, not the pixel ones.
Installing it
Through ComfyUI Manager: search "WAS Node Suite", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
cd was-node-suite-comfyui
pip install -r requirements.txt
Nothing to download - it's a pure metadata read, no model or heavy dependency involved.
Troubleshooting
The one genuine gotcha is the compression-factor confusion above: if a downstream node is getting numbers that seem "too small," it's very likely you wanted pixel dimensions and grabbed the latent ones (or vice versa) - check whether the number needs to be multiplied or divided by the VAE's compression factor before it's used somewhere expecting pixel space.
Beyond that, this is a low-risk utility node - no external dependency, nothing that changes behavior between environments. If it's missing from your menu entirely, that's the whole-suite import problem this pack is prone to: WAS Node Suite hasn't seen active development since December 2023, and a ComfyUI core update occasionally breaks its startup over a stale pinned dependency elsewhere in the pack (BLIP support is the usual one). Check your console log at startup before troubleshooting this node specifically.
Inputs (0)
No inputs
Outputs (0)
No outputs