Nodes/Diztraido Nodes/String Manager
ComfyUI Node

String Manager

Up to 24 prompts, each with its own aspect ratio, switched by a number

By jadervasque·Created 2 months ago·Updated 2 months ago· 0
String Manager
    • string_selected
    • resolution_selected
    num_fields5
    selected_string1
    string_1
    aspect_ratio_11:1 (Square)
    string_2
    aspect_ratio_21:1 (Square)
    string_3
    aspect_ratio_31:1 (Square)
    string_4
    aspect_ratio_41:1 (Square)
    string_5
    aspect_ratio_51:1 (Square)
    string_6
    aspect_ratio_61:1 (Square)
    string_7
    aspect_ratio_71:1 (Square)
    string_8
    aspect_ratio_81:1 (Square)
    string_9
    aspect_ratio_91:1 (Square)
    string_10
    aspect_ratio_101:1 (Square)
    string_11
    aspect_ratio_111:1 (Square)
    string_12
    aspect_ratio_121:1 (Square)
    string_13
    aspect_ratio_131:1 (Square)
    string_14
    aspect_ratio_141:1 (Square)
    string_15
    aspect_ratio_151:1 (Square)
    string_16
    aspect_ratio_161:1 (Square)
    string_17
    aspect_ratio_171:1 (Square)
    string_18
    aspect_ratio_181:1 (Square)
    string_19
    aspect_ratio_191:1 (Square)
    string_20
    aspect_ratio_201:1 (Square)
    string_21
    aspect_ratio_211:1 (Square)
    string_22
    aspect_ratio_221:1 (Square)
    string_23
    aspect_ratio_231:1 (Square)
    string_24
    aspect_ratio_241:1 (Square)

    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 with control_after_generate.
    • string_1string_24 - the multiline prompts (socketless).
    • aspect_ratio_1aspect_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.

    CategoryDiztraido/utils

    Inputs (50)

    NameTypeDefaultDescription
    num_fieldsINT51–24
    selected_stringINT11–24
    string_1optSTRING
    aspect_ratio_1optCOMBO1: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_2optSTRING
    aspect_ratio_2optCOMBO1: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_3optSTRING
    aspect_ratio_3optCOMBO1: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_4optSTRING
    aspect_ratio_4optCOMBO1: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_5optSTRING
    aspect_ratio_5optCOMBO1: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_6optSTRING
    aspect_ratio_6optCOMBO1: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_7optSTRING
    aspect_ratio_7optCOMBO1: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_8optSTRING
    aspect_ratio_8optCOMBO1: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_9optSTRING
    aspect_ratio_9optCOMBO1: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_10optSTRING
    aspect_ratio_10optCOMBO1: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_11optSTRING
    aspect_ratio_11optCOMBO1: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_12optSTRING
    aspect_ratio_12optCOMBO1: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_13optSTRING
    aspect_ratio_13optCOMBO1: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_14optSTRING
    aspect_ratio_14optCOMBO1: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_15optSTRING
    aspect_ratio_15optCOMBO1: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_16optSTRING
    aspect_ratio_16optCOMBO1: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_17optSTRING
    aspect_ratio_17optCOMBO1: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_18optSTRING
    aspect_ratio_18optCOMBO1: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_19optSTRING
    aspect_ratio_19optCOMBO1: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_20optSTRING
    aspect_ratio_20optCOMBO1: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_21optSTRING
    aspect_ratio_21optCOMBO1: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_22optSTRING
    aspect_ratio_22optCOMBO1: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_23optSTRING
    aspect_ratio_23optCOMBO1: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_24optSTRING
    aspect_ratio_24optCOMBO1: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)

    NameTypeDescription
    string_selectedSTRING
    resolution_selected1: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