AfterDark Film AR Selector
The AfterDark Film AR Selector just saves you from typing 1344x768 again
- width
- height
If you've ever stared at an Empty Latent Image node wondering what to type for a "cinematic" shot, this is the node for you. The AfterDark Film AR Selector is a dropdown of preset resolutions named after real film and photography formats - 35mm, medium format 6x7, Cinemascope, XPan - and all it does is output the matching width and height. That's it. No API, no models to download, no dependencies. It's a glorified lookup table, and for a lot of workflows that's exactly what you want.
Why you'd reach for it: the presets are tuned for models with a 1024x1024 native resolution - Z-Image Turbo, SDXL, Pony, and Flux, per the author. These models are trained on specific aspect ratios, and generating far off-ratio stretches anatomy and composition. The old SDXL advice still holds: generate at a trained ratio, then upscale in passes. Z-Image especially wants to stay in the 1–2MP range, and the selector's landscape presets like 1344x768 and 1216-ish widths sit right in that sweet spot.
How it works
The node is a single Python class with a hardcoded list of ~30 entries. You pick one from the resolution_preset dropdown, and the node parses the numbers out of the label and returns them as two plain integers. There's no hidden state, no randomness, no sampler involved.
One detail that might confuse you the first time: the dropdown contains actual section headers - --- Portrait ---, --- Landscape ---, --- Cinematic ---, --- Print ---. They're not resolutions; if you select one, the code just silently advances to the next real preset below it. So clicking --- Cinematic --- hands you the Academy Ratio entry. Mildly odd design, but harmless.
The inputs and outputs that matter
The whole node is one input and two outputs:
resolution_preset- the dropdown. This is the only thing you'll set. The lineup runs from square (1024x1024, medium format 6x6) through portrait (35mm at 832x1248, 9:16 at 768x1344), landscape, cinematic (Academy Ratio, 16:9, Cinemascope at 1504x640, XPan, Ultra Panavision), and a few print ratios like 4:5 and 5:7.widthandheight- both INTs. Wire them into an Empty Latent Image node's width/height fields, or straight into the sampler setup for whatever model you're running.
The last entry in the dropdown is Custom (Manual Override), which just falls back to 1024x1024 - the source also lets you type in your own dimensions if nothing in the list fits your shot. For everything else, pick a preset and forget the math.
Installing it
Both nodes in this pack install together, since they ship in the same repo. The easiest route is ComfyUI Manager: search for HackAfterDark (the pack title is "AfterDark Film AR Selector") and install. Or, the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/hackafterdark/ComfyUI-HackAfterDark-Nodes
Then restart ComfyUI. There are no model files and no extra Python packages required for this node - it's pure Python, so it loads clean even if the pack's Gemini node can't.
Common issues
Honestly, this node doesn't have failure modes worth losing sleep over. The one real "gotcha" is contextual: it outputs numbers, and it's up to you to feed them to the right node. Beginners sometimes wire width/height into a model loader instead of the latent/sampler side. If you're new, the pattern is: AR Selector → Empty Latent Image → KSampler. And remember these presets assume a 1024-native model - if you're running an SD1.5-era checkpoint that wants 512, don't use the cinematic ultrawide preset and expect the model to cope.
It's a small, no-drama utility node. The kind you install once, keep in your standard workflow, and quietly stop thinking about - which, for a sizing helper, is a compliment.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution_preset | COMBO | 32 options: --- Portrait ---, 1024x1024 (Square / MF 6x6), 864x1152 (3:4 Classic Portrait), 960x1120 (MF 6x7 Portrait), 864x1152 (MF 645 Portrait), 832x1248 (35mm Portrait), +26 | |
| custom_widthopt | INT | 00–8192 | — |
| custom_heightopt | INT | 00–8192 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |