ScarlotSoft Resolution
Pick megapixels, get dimensions and a latent — the ScarlotSoft Resolution node
- width
- height
- preview
- latent
Most of the time you set a canvas you do the math by hand: pick a ratio, decide the total area, divide by eight until the numbers look clean. ScarlotSoft Resolution automates that exact dance and then hands you the latent, which is the part that usually means more nodes. Choose megapixels and a ratio, and it returns the width, the height, a preview image, and a ready-to-sample LATENT - a one-node replacement for "Empty Latent Image plus a calculator."
The inputs tell the whole story. megapixel is a dropdown from 0.1 to 2.5 MP, which covers SD 1.5's ~0.5 MP comfort zone and SDXL's ~1 MP, with room to push higher. aspect_ratio is the same 23 named ratios the suite's Aspect Ratio node uses, so the two stay consistent if you wire the suite together. divisible_by lets you snap to 8, 16, 32, or 64 - the default 64 is the safe pick for most models because the VAE downsamples by 8 and the latent grid wants multiples of that. batch_size sets how many latents come out.
Under the hood it's exactly what it looks like: it parses 16:9 (Panorama down to the numbers, computes height = sqrt(MP*1e6 / ratio), rounds both sides to your divisor, builds a torch.zeros([batch, 4, h//8, w//8]) latent dictionary just like Empty Latent Image does, and draws a preview - a red frame with the final dimensions and ratio text centered in it. So the preview output is a genuine IMAGE you can look at before you commit, and latent plugs straight into a KSampler. width and height are INTs you can feed a conditioning node or use to size a later upscale.
The "Golden Ratio" labels are pure marketing - 3:4 is not φ - so ignore the names and read the numbers. Where people trip: picking a megapixel the checkpoint wasn't trained near and getting doubled limbs or artifacts, which is the standard resolution-over-training complaint. The fix isn't the node, it's the habit from the upscaling playbook - generate near native resolution and upscale after. Keep 1.0 MP for SDXL unless you know better.
Install via Manager (search ScarlotSoft) or:
cd ComfyUI/custom_nodes
git clone https://github.com/scarlotsoft/ComfyUI_ScarlotSoft
then restart. No extra dependencies for this node; the heavy auto-installs only kick in on the detector nodes. The suite's nodes share a dark theme, and the boot message's standing advice applies: if anything looks off after a UI-mode switch, hard-refresh (Ctrl+Shift+R).
Is it worth installing a whole pack for? Only if you're already in the ScarlotSoft world - the Preview feature and the drop-down ratios are genuinely nicer than the bare core node, but core Empty Latent Image plus a PrimitiveInt pair gets you 90% of the way. For someone new, this is the friendlier on-ramp: one node, four widgets, no arithmetic.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| megapixel | COMBO | 1.0 | 25 options: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, +19 |
| aspect_ratio | COMBO | 1:1 (Perfect Square) | 23 options: 1:1 (Perfect Square), 2:3 (Classic Portrait), 3:4 (Golden Ratio), 3:5 (Elegant Vertical), 4:5 (Artistic Frame), 5:7 (Balanced Portrait), +17 |
| divisible_by | COMBO | 64 | 4 options: 8, 16, 32, 64 |
| batch_size | INT | 11–64 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| preview | IMAGE | — |
| latent | LATENT | — |