Aspect 1:X
One image, every platform ratio — without the crop roulette
- image
- image_out
- filename_labels
If you've ever generated a hero image and then spent ten minutes trying to get an Instagram post, a YouTube thumbnail, and a Discord banner out of it, Aspect 1:X is the node that makes that a two-click job. It takes one image and reshapes it to any of 28 named aspect-ratio presets - social ratios like 9:16 stories, 4:5 Instagram portrait, 1:1 feed; photo formats like 3:2, 6:7 medium format, 65:24 XPan; and cinema ratios like 2.39:1 anamorphic and 1.43:1 IMAX. All the ratios an art director will actually ask for, pre-named so you don't have to remember that TikTok wants 9:16 and LinkedIn wants 1.91:1.
It's part of MKRShift Nodes, Cris K B's production-focused pack for ComfyUI. Pure layout math - no models, no downloads beyond the pack itself.
How it works
Give it an image, pick a preset, and it reshapes to that aspect ratio in one of two modes. pad fits the image inside the target frame and fills the leftover space - default is a blur of the source, which looks like an intentional cinematic background rather than a black bar (you can switch to black, white, or gray if you want something cleaner). crop scales the image up until it fills the frame and cuts away the overflow.
orientation (Portrait / Horizontal) matters because some presets flip meaning depending on it - 9:16 as a portrait is a story, as horizontal it's a wide strip. The Position dropdown (nine options from Top-Left to Bottom-Right) plus X • Offset / Y • Offset let you choose where the image sits inside the padded frame or where the crop window cuts - so you can keep a face out of the letterbox instead of letting the center crop mangle it.
The unsung output here is filename_labels: a STRING built from your filename_prefix_base (default "AX1"), the orientation, and the aspect slug. Wire it into a save node's filename and you get delivery-ready names like AX1_portrait_9x16.png for free - which is exactly the kind of thing that stops your final export folder from being "final_v3 (2) (copy)".png.
Outputs
image_out- the reshaped IMAGE, ready for a save or preview nodefilename_labels- the formatted filename label for downstream naming
Installation
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI - or use ComfyUI Manager and search for "MKRShift Nodes." No requirements to pip-install for this node; the pack is dependency-light by design.
Common issues
The trap is mode selection plus blur background. pad with blur looks great on stills, but the blurred fill is a baked copy of the image - if you then run the whole thing through another generative pass, the fill pixels get processed like content. If you want a truly clean background for further generation, use crop or a flat color. And remember the offsets are in pixels on the reshaped canvas, so a large offset on a small image can push your subject fully into the blur. For "every platform at once" there's the sibling node Aspect 1:X Batch, which runs the whole preset list in one go - this one is for when you know exactly which ratio you need.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| aspect_1x | COMBO | Social - 9:16 (Stories/Reels/TikTok) | 28 options: Social - 9:16 (Stories/Reels/TikTok), Social - 4:5 (Instagram Portrait), Social - 1:1 (Square/Instagram Feed), Social - 1.91:1 (Facebook/LinkedIn Landscape), Social - 3:4 (Instagram Grid/Threads), Social - 19:6 (TikTok Wide-View/Landscape), +22 |
| orientation | COMBO | Portrait | 2 options: Portrait, Horizontal |
| mode | COMBO | pad | 2 options: pad, crop |
| X • Offsetopt | INT | 0-4096–4096 | — |
| Y • Offsetopt | INT | 0-4096–4096 | — |
| Positionopt | COMBO | Center • Center | 9 options: Top • Left, Top • Center, Top • Right, Center • Left, Center • Center, Center • Right, +3 |
| filename_prefix_baseopt | STRING | AX1 | — |
| background_modeopt | COMBO | blur | 4 options: black, blur, gray, white |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image_out | IMAGE | — |
| filename_labels | STRING | — |