ComfyUI Node

Image Scale

The Node That Computes Sizes Instead of Resizing

By geocine·Created 2 years ago·Updated 2 months ago· 1
Image Scale
    • latent_width
    • latent_height
    • upscale_by
    • tile_width
    • tile_height
    width512
    height512
    upscale_by0.00

    The name is a lie, and it's a useful lie to understand before you drag it in. "Image Scale" doesn't touch a single pixel. It doesn't even take an image as input. What it actually does is compute numbers - latent dimensions and tile sizes - that you then feed to the nodes that do the real work. Think of it as a calculator node for upscaling math, not an image transform.

    Which sounds underwhelming until you've hand-derived a latent size for a tiled upscale one too many times. That arithmetic is exactly what this node automates.

    How it works

    Give it a pixel width and height plus an optional upscale_by factor, and it returns five numbers. The source is small and easy to follow:

    • If upscale_by > 0: latent dimensions are simply width × upscale_by and height × upscale_by.
    • If upscale_by is 0 (the default): it "fits" the image to 512 on its longer side first, then computes the implied upscale factor from that fit.
    • Either way, it also emits tile_width and tile_height - roughly half the scaled dimension plus 32 pixels of padding, the kind of figure tiled-upscale nodes and tiled VAE decode want as a starting tile size.
    if upscale_by > 0:
        latent_width = int(width * upscale_by)
        latent_height = int(height * upscale_by)
    ...
    tile_width = int(upscale_by * width / 2 + tile_padding)
    tile_height = int(upscale_by * height / 2 + tile_padding)
    

    So the workflow shape is: target pixels in, latent size and tile sizes out, then those wires go into an upscaler or a latent-size-aware sampler.

    Inputs and outputs

    The inputs that matter:

    • width / height - your base pixel dimensions (32–8192).
    • upscale_by - an optional multiplier (0–10). Leave it at 0 to let the node auto-fit to 512; set it to actually scale.

    The five outputs:

    • latent_width / latent_height - dimensions to feed into latent-based sampling or an Empty Latent node.
    • upscale_by - the factor it used, so you can reuse it downstream.
    • tile_width / tile_height - tile size suggestions for tiled upscaling or tiled VAE decode.

    Why you'd reach for it

    Tiled upscaling is where latent-size math actually matters. The knowledge base's upscaling essay makes the point that in 2026 the conversation has moved on from "which upscaler" to the surrounding infrastructure - tile sizes, latent dims, and how a 2× target maps onto a batch. This node is that infrastructure in miniature: change the target, and every downstream number updates in one place instead of five. If you run a multi-stage upscale workflow with several resolution-dependent nodes, that's the exact headache it removes.

    Install

    It ships in geocine-comfyui - one install, all eleven nodes, no model downloads:

    • ComfyUI Manager → search geocine-comfyui → install → restart
    • or Comfy CLI: comfy node install geocine-comfyui
    • or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/geocine/geocine-comfyui
    

    then restart ComfyUI.

    Gotchas

    It's not an image resizer. If you expected a IMAGE out, you'll be staring at five numbers instead. For an actual resize, use core ComfyUI's ImageScale nodes - those take pixels and change them. This node only computes. The auto-fit defaults to 512. With upscale_by at 0, the "latent" dimensions you get are fit-to-512 numbers, which is a reasonable baseline but may not match the actual target resolution you had in mind - set upscale_by explicitly if your workflow has a real target size.

    Categorygeocine

    Inputs (3)

    NameTypeDefaultDescription
    widthINT51232–8192
    heightINT51232–8192
    upscale_byoptFLOAT0.000–10

    Outputs (5)

    NameTypeDescription
    latent_widthINT
    latent_heightINT
    upscale_byFLOAT
    tile_widthINT
    tile_heightINT