Kepri Aspect Ratio (Select → String)
One dropdown to keep every Finalize on the same aspect ratio
- aspect_ratio
KepriAspectRatio is the smallest node in the Kepri pack, and it exists to fix one specific annoyance: a dropdown you can't wire.
On KepriImageFinalize, aspect_ratio is a COMBO widget. Combos are great to click and annoying to connect - a widget value is just a value sitting on the node, there's no way to feed it from another node. So when your graph has two or three Finalize nodes that all have to stay on the exact same format, you'd be left manually matching dropdowns and hoping nobody changes one of them.
This node turns that choice into a plain STRING you can wire anywhere. Pick 1:1, 16:9, whatever, and the aspect_ratio output feeds straight into a Finalize's aspect_ratio_override input - directly, or through Set/Get nodes if you want to stash it and reuse it across a bigger graph. Change it once, every Finalize follows.
Where you'd actually use it
Kepri's own production pattern: a background-removal subgraph that produces a transparent preprocess, plus a separate plate-reframe Finalize that composites the final photo. Those two have to agree on the format or the whole assembly drifts apart. One KepriAspectRatio wired to both aspect_ratio_override inputs keeps them synchronized by construction.
The choices are literally imported from KepriImageFinalize's own list - the code shares a single ASPECT_RATIOS constant, so the two can never drift apart into "these options exist here but not there" territory. That's the kind of detail that tells you this is production software, not a weekend pack.
What you get
One input, one output:
aspect_ratio- the dropdown:original,1:1,4:3,3:4,16:9,9:16,2:3,3:2,5:4,4:5.- Output
aspect_ratio- the same value as a STRING.
Install
It's part of comfyui-kepri-nodes-pack. ComfyUI Manager → search "comfyui-kepri-nodes-pack" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/wearekhepri/comfyui-kepri-nodes-pack
Restart and refresh; the node sits under Kepri/Background. Zero dependencies beyond the torch ComfyUI already ships, and no model downloads. Heads-up: the README's clone snippet still points at the wrong repo URL (comfyui-kepri.git) - use comfyui-kepri-nodes-pack above.
A small bonus: KepriImageFinalize's aspect_ratio_override also accepts original or any integer W:H pair, so you're not strictly limited to the dropdown's ten choices. If you need an oddball format like 5:6, a plain STRING primitive works too - this node just gives you the validated dropdown when you want it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 | Format cible, mêmes valeurs que le widget aspect_ratio de KepriImageFinalize. La sortie STRING se branche dans aspect_ratio_override (directement ou via Set/Get) pour garder plusieurs Finalize synchro sur le même format. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| aspect_ratio | STRING | — |