Get Size JK๐
What resolution is this thing? Get Size JK answers for image, latent, or mask
- image
- latent
- mask
- width
- height
Every inpainting, upscaling, or outpainting workflow eventually asks the same question: what are the dimensions of this thing? Get Size JK is the node that answers it without you hunting through a Preview output or doing tensor math by hand. Feed it an image, a latent, or a mask - any one of them - and get back width and height as integers.
The mechanism is where the interesting detail hides:
- Image: reads the tensor's shape directly - width and height in pixels.
- Latent: reads the latent's sample shape and multiplies by 8. Latents live at 1/8 resolution in SD-lineage models, so this converts back to the pixel dimensions the VAE would produce. That's the node quietly doing the mental math you usually do yourself.
- Mask: reads the mask's pixel shape, same as an image.
It's the glue between "here's an image" and "compute the target resolution" - you can chain it into a resize math node or a crop-by-mask computation so the target resolution follows the source automatically instead of being hard-coded.
The honest caveat: this node is marked deprecated in the pack. The newer crop/resize nodes in JakeUpgrade compute dimensions internally (the "Image Crop By Mask Resolution Grp" family), so standalone Get Size is mostly there for older workflows and backward compatibility. If it's the only thing you need, there are also leaner alternatives elsewhere in the ecosystem. But it still works fine, and if you're maintaining an existing graph, no reason to rip it out.
Install. It's part of ComfyUI-JakeUpgrade:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Or ComfyUI Manager โ "JakeUpgrade". Windows portable: install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt. Restart.
Gotchas: the DEPRECATED = True flag on this class is informational - it still loads from the main image module, unlike the separate config-gated set of truly retired nodes in the pack. If Get Size JK is genuinely missing, the usual cause is that you trimmed modules in config.ini (keep image enabled); if a different JK node goes missing from a shared workflow, that's when the README's LOAD_DEPRECATED_NODES = True fix applies. Also note all three inputs are optional and it picks whichever is connected - if you connect both an image and a latent, the image wins, which is usually what you want but worth knowing when a latent's 8x math doesn't match your image. And the README's standing advice: disable ComfyUI MultiGPU on current ComfyUI to avoid CUDA errors.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| imageopt | IMAGE | โ | |
| latentopt | LATENT | โ | |
| maskopt | MASK | โ |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | โ |
| height | INT | โ |