ComfyUI Node

Scaled Latent

An empty latent that already knows what Half means

By naukri7707·Created 5 months ago·Updated 5 months ago· 0
Scaled Latent
    • latent
    sizeFull
    width1368
    height768
    batch_size1

    ScaledLatent is what Empty Latent Image becomes when you keep working at fraction sizes. You give it a base width and height, pick Full, Half, or Quarter, and it hands you a blank latent at that fraction, aligned to a multiple of 8. Nothing else. It ships in the same small Anima pack as PromptWeaver, and it exists to save you the mental math when you're doing multi-pass work at related resolutions.

    Why bother? Anima is slow for its size and wants 30-50 steps, so the community's habit is to lock composition cheap before committing. The consensus route to crisp Anima output is a first pass around 1280 with a latent-upscale pass after - and when you're iterating on composition, a Half pass to sanity-check a seed costs about a quarter of the time. ScaledLatent turns that into a dropdown instead of a division. Set 1368x768 (the defaults, roughly 16:9), pick Half, and you get the latent for a ~680x384 canvas without typing a second resolution and getting it wrong.

    How it works

    This is about as simple as a node gets, straight from the source: a scale map (Full 1.0 / Half 0.5 / Quarter 0.25), a multiply, a floor to a multiple of 8, then a torch.zeros([batch_size, 4, h//8, w//8]) wrapped in the standard {"samples": ...} latent dict. Four channels at one-eighth resolution is ordinary VAE latent space, which is exactly what a KSampler expects on its latent input. One edge detail worth knowing: it truncates rather than rounds. Half of 1368 is 684, but you get 680, because 684 isn't a multiple of 8. Fine for a draft; just don't assume exact halves.

    Inputs and output

    • size - Full / Half / Quarter. Only three steps, so if you want 0.75 or anything above 1x, this isn't the node. That's LatentUpscale territory, and it operates on an existing latent rather than a blank one.
    • width, height - 64 to 8192, stepped by 8. The base you scale from.
    • batch_size - 1 to 64, for producing a whole batch of blanks at once.

    The single output is latent, which wires straight into the KSampler in the standard chain: conditioning → KSampler → VAE decode.

    Install and gotchas

    Same pack as PromptWeaver - clone it into custom_nodes/ and restart ComfyUI, or search ComfyUI Manager for the pack title. No dependencies beyond torch, no model files, nothing to download.

    There's genuinely nothing to break here: it's a few lines of tensor math with no file I/O. The only real trap is treating it as a general-purpose resizer, which it isn't. It makes blank canvases for starting a generation. If you want to take an existing image to a higher resolution, you're looking for a latent upscale or an image upscaler, not this node.

    CategoryAnimaPromptWeaver

    Inputs (4)

    NameTypeDefaultDescription
    sizeCOMBOFull3 options: Full, Half, Quarter
    widthINT136864–8192
    heightINT76864–8192
    batch_sizeINT11–64

    Outputs (1)

    NameTypeDescription
    latentLATENT