Nodes/MKRShift_Nodes/Aspect 1:X Batch
ComfyUI Node

Aspect 1:X Batch

Every aspect ratio at once, named and ready to export

By criskb·Created 7 months ago·Updated 5 months ago· 0
Aspect 1:X Batch
  • image
  • image_out
  • filename_labels
  • labels_with_descriptions
orientationPortrait
modepad
X • Offset0
Y • Offset0
PositionCenter • Center
filename_prefix_baseAX1
background_modeblur

Aspect 1:X Batch is the sibling of the single Aspect 1:X node, and it exists for the one job the single node can't do: "give me this image in every ratio the client might want, in one run." Feed it one image and it spits out a list of reshaped versions covering every preset in the chosen orientation - 9:16 story, 4:5 portrait, 1:1 square, 1.91:1 landscape, 2.39:1 cinema, the whole social/photo/cinema catalog. It's the delivery-workflow node: run it once, and your export folder is complete before you've finished your coffee.

Same author, same pack: MKRShift Nodes by Cris K B. Same dependency story - pure layout math, nothing to download beyond the pack.

How it works

The mechanism is identical to its single-image sibling: each image gets reshaped to each target ratio via pad (with a blur/black/white/gray fill) or crop, positioned by the Position dropdown plus X • Offset / Y • Offset. The difference is that orientation gains a third option: Both. Pick it and you get every preset in both Portrait and Horizontal orientations - with duplicates de-duplicated, so square formats like 1:1 and 6:6 don't come out twice. The source explicitly keeps the output order stable, which matters when you're pairing the image list with its filename labels downstream.

This is where the list outputs earn their keep:

  • image_out - the reshaped IMAGE list (one entry per image × ratio)
  • filename_labels - parallel STRING list with names like AX1_portrait_9x16 built from your filename_prefix_base
  • labels_with_descriptions - an extended STRING list that also carries the friendly preset description, so you can hand readable labels to a spreadsheet or manifest

Because the three lists are built in lockstep, you can wire image_out and filename_labels into a batch save node and get every file named correctly with zero post-renaming.

Installation

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart ComfyUI, or search "MKRShift Nodes" in ComfyUI Manager. No extra pip dependencies for this node.

Common issues

The one thing that bites people is forgetting that this node returns lists, not a single image. If you wire image_out straight into a node that expects one IMAGE tensor, you'll get a shape error or a silent first-frame-only pass depending on the consumer - check that the downstream node takes a list (many save/preview nodes do). Second, the blur pad fill is baked content; if you plan to generate on top of these later, switch to crop or a flat background so you're not diffusing into a copy of your own subject. And since Both roughly doubles your output count, a batch of 20 source images becomes a lot of frames fast - it's designed for final delivery, not mid-iteration, so run it last.

CategoryMKRShift Nodes/Core/Layout

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
orientationCOMBOPortrait3 options: Portrait, Horizontal, Both
modeCOMBOpad2 options: pad, crop
X • OffsetoptINT0-4096–4096
Y • OffsetoptINT0-4096–4096
PositionoptCOMBOCenter • Center9 options: Top • Left, Top • Center, Top • Right, Center • Left, Center • Center, Center • Right, +3
filename_prefix_baseoptSTRINGAX1
background_modeoptCOMBOblur4 options: black, blur, gray, white

Outputs (3)

NameTypeDescription
image_outIMAGE
filename_labelsSTRING
labels_with_descriptionsSTRING