String Manager
Up to 24 prompts, each with its own aspect ratio, switched by a number
- string_selected
- resolution_selected
Batch workflows live or die on the "one prompt at a time, many prompts total" pattern, and that's exactly what String Manager is built for. It stores up to 24 multiline prompts, lets you attach a different aspect ratio to each one, and outputs the selected pair: string_selected and resolution_selected. Change the selected_string number and you get a different prompt and a different resolution in one move. Wire resolution_selected straight into the pack's Resolution Selector Extended, and you've got a neat "batch of prompts, each in its native format" machine.
The aspect-ratio-per-prompt pairing is the feature that separates it from a plain text switcher. Portrait prompts get 2:3, landscape get 16:9, square gets 1:1 - and the resolution follows the prompt, so a queue that walks through your prompt list also walks through the right formats. The author even plans for the next step: selected_string supports control_after_generate, so you can have ComfyUI auto-increment the selector after each run and chew through all 24 prompts sequentially without touching the UI.
How it works
Backend logic is simple selection: clamp selected_string to a valid field, grab that field's string and aspect ratio, return them. The complexity lives in the frontend. The widgets are socketless (they live on the node, not as wires), num_fields controls how many prompt/ratio pairs are visible so you're not staring at 24 empty text boxes, and the JS extension hides the inactive pairs. The aspect ratios are the same 23-option list as Resolution Selector Extended, so the two nodes click together - that's the intended design: this node picks the ratio, the Resolution Selector does the width/height math from it.
The inputs that matter
num_fields- 1 to 24, how many prompt/ratio pairs are shown (default 5).selected_string- 1 to 24, which pair is active. This is the one you automate withcontrol_after_generate.string_1…string_24- the multiline prompts (socketless).aspect_ratio_1…aspect_ratio_24- one of the 23 ratio presets per prompt (socketless).
Outputs: string_selected (STRING) - the active prompt, and resolution_selected (aspect-ratio enum) - that prompt's ratio, meant for the aspect_ratio input of Resolution Selector Extended.
How to install
Part of Diztraido Nodes. ComfyUI Manager → search "Diztraido Nodes" → install diztraido-nodes → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jadervasque/ComyUI-Diztraido.git
Restart and it's under the Diztraido utils category. No dependencies or models.
Common issues
The traps are all selector-shaped. If you change a prompt but the output doesn't change, check selected_string - you're probably looking at a different pair than you edited. num_fields clips the active range: if num_fields is 5 but selected_string says 8, the backend clamps the selection down to a valid field, which can silently point at the wrong prompt. And remember this node only outputs the prompt string - it doesn't encode anything; you still feed string_selected into a text encoder (or this pack's Metadata Reader Advanced-style wiring), and resolution_selected into the Resolution Selector before the latent gets sized.
Inputs (50)
| Name | Type | Default | Description |
|---|---|---|---|
| num_fields | INT | 51–24 | — |
| selected_string | INT | 11–24 | — |
| string_1opt | STRING | — | |
| aspect_ratio_1opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_2opt | STRING | — | |
| aspect_ratio_2opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_3opt | STRING | — | |
| aspect_ratio_3opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_4opt | STRING | — | |
| aspect_ratio_4opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_5opt | STRING | — | |
| aspect_ratio_5opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_6opt | STRING | — | |
| aspect_ratio_6opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_7opt | STRING | — | |
| aspect_ratio_7opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_8opt | STRING | — | |
| aspect_ratio_8opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_9opt | STRING | — | |
| aspect_ratio_9opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_10opt | STRING | — | |
| aspect_ratio_10opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_11opt | STRING | — | |
| aspect_ratio_11opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_12opt | STRING | — | |
| aspect_ratio_12opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_13opt | STRING | — | |
| aspect_ratio_13opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_14opt | STRING | — | |
| aspect_ratio_14opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_15opt | STRING | — | |
| aspect_ratio_15opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_16opt | STRING | — | |
| aspect_ratio_16opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_17opt | STRING | — | |
| aspect_ratio_17opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_18opt | STRING | — | |
| aspect_ratio_18opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_19opt | STRING | — | |
| aspect_ratio_19opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_20opt | STRING | — | |
| aspect_ratio_20opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_21opt | STRING | — | |
| aspect_ratio_21opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_22opt | STRING | — | |
| aspect_ratio_22opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_23opt | STRING | — | |
| aspect_ratio_23opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
| string_24opt | STRING | — | |
| aspect_ratio_24opt | COMBO | 1:1 (Square) | 23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| string_selected | STRING | — |
| resolution_selected | 1:1 (Square),2:3 (Portrait Photo),3:2 (Photo),3:4 (Portrait Standard),4:3 (Standard),9:16 (Portrait Widescreen),16:9 (Widescreen),21:9 (Ultrawide),5:4 (Classic Landscape),4:5 (Social Portrait),7:5 (Photo Landscape),5:7 (Photo Portrait),10:8 (Classic Landscape),8:10 (Classic Portrait),8:5 (Wide Landscape),5:8 (Tall Portrait),3:1 (Panoramic Landscape),1:3 (Panoramic Portrait),2:1 (Wide Panorama),1:2 (Tall Panorama),7:6 (Compact Landscape),6:7 (Compact Portrait),Custom | — |