Nodes/Extra Models for ComfyUI/Sana Resolution Select
ComfyUI Node

Sana Resolution Select

Pick a resolution Sana was actually trained on

By city96·Created 3 years ago·Updated 2 years ago· 537
Sana Resolution Select
    • width
    • height
    model
    ratio1.00

    Like most diffusion transformers, Sana wasn't trained across every possible resolution - it was trained on a specific set of resolution "buckets" per model size, and generating outside that list tends to degrade quality or outright break the math behind its heavily compressed 32-channel, /32 latent space. Rather than making you hunt down or hand-calculate a valid width/height pair, this node is a lookup table: pick your model and an aspect ratio, get back the exact resolution Sana expects.

    Quick context before you dive in: this pack's own README flags Sana support here as rough, and there's a real report of the Sana checkpoint loader in this pack breaking on newer Sana1.5 releases - the dropdown only recognizing the original 0.6B/1.6B models. This node's resolution tables reflect that same original generation, so if you're on a newer checkpoint, don't assume they still apply.

    Inputs and outputs

    • model - an enum: 1024px, 512px, 2K, plus two specific checkpoint names, SanaMS_600M_P1_D28 and SanaMS_1600M_P1_D20. Pick whichever matches the checkpoint you actually loaded.
    • ratio - an enum of 40 predefined aspect-ratio values (from around 0.25 up past 1.00), covering portrait through landscape.

    Outputs: width and height (both INT) - wire both straight into your Empty Latent node, and also into Sana Resolution Cond so the latent's actual shape and the conditioning's stated resolution agree with each other. Feeding the two downstream nodes different numbers - say, the resolution this node gave you into the latent, but a hand-typed number into the conditioning - is a subtle way to get soft or malformed output without any error telling you the two disagree.

    How it works

    It's a lookup, not a live computation - the pack ships Sana's own published per-model resolution tables, and this node just returns the matching pair for whatever model/ratio combination you selected.

    Installing it

    Part of the whole ComfyUI_ExtraModels pack - no extra download for this node specifically, it's config, not weights:

    • ComfyUI Manager - search "Extra Models for ComfyUI", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/city96/ComfyUI_ExtraModels, then pip install -r requirements.txt. Restart.

    Common issues

    This node doesn't read your loaded checkpoint to figure out which model you're running - it's on you to keep the model field in sync with whatever's actually loaded in your checkpoint loader. Pick 512px while running the 1024 checkpoint and you'll get a technically-valid-looking resolution pair that's simply wrong for the model you're using, with nothing flagging the mismatch.

    And again: these tables are for the original Sana releases this pack was built against. If newer Sana variants use different resolution buckets, this node won't know about them - it'll happily return a value from the old table with no indication it might not fit the checkpoint you're actually running.

    CategoryExtraModels/Sana

    Inputs (2)

    NameTypeDefaultDescription
    modelCOMBO5 options: 1024px, 512px, 2K, SanaMS_600M_P1_D28, SanaMS_1600M_P1_D20
    ratioCOMBO1.0040 options: 0.25, 0.26, 0.27, 0.28, 0.32, 0.33, +34

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT