Sana Resolution Select
Pick a resolution Sana was actually trained on
- width
- height
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_D28andSanaMS_1600M_P1_D20. Pick whichever matches the checkpoint you actually loaded. - ratio - an enum of 40 predefined aspect-ratio values (from around
0.25up past1.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, thenpip 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.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 5 options: 1024px, 512px, 2K, SanaMS_600M_P1_D28, SanaMS_1600M_P1_D20 | |
| ratio | COMBO | 1.00 | 40 options: 0.25, 0.26, 0.27, 0.28, 0.32, 0.33, +34 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |