Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfyui-dynamic-selector

ComfyUI Extension: comfyui-dynamic-selector

Repo Name

comfyui-dynamic-selector

Author
wakaura-asaho (Account age: 544 days)
Nodes
View all nodes(1)
Latest Updated
2026-11-07
Github Stars
0.0K

How to Install comfyui-dynamic-selector

Install this extension via the ComfyUI Manager by searching for comfyui-dynamic-selector
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-dynamic-selector in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

comfyui-dynamic-selector Description

comfyui-dynamic-selector adds ComfyUI nodes to switch workflow inputs by index, name, condition, or weighted chance; group related assets and iterate over prompts or settings without rewiring.

comfyui-dynamic-selector Introduction

comfyui-dynamic-selector is a collection of ComfyUI utility nodes that helps you choose, organize, and repeat parts of an image-generation workflow. Instead of rebuilding a graph whenever you want to try another image, prompt, model, or setting, you can connect several options and control which one flows through the graph.

The extension is useful when you want to:

  • Switch between connected inputs without rewiring your workflow.
  • Give inputs readable names, such as character or scene names.
  • Keep related assets together and choose an item from a group.
  • Add variety by making a random choice, with optional weights to make some options more likely.
  • Run the same downstream workflow across a series of prompts or numerical settings.

These nodes route and organize data; they do not generate images by themselves. Your existing ComfyUI nodes continue to perform the generation.

How comfyui-dynamic-selector Works

Think of a selector as a junction in your workflow. Several paths enter it, but only the chosen path leaves through its output. For example, you might connect three images to input_0, input_1, and input_2, then choose which image goes to the next node. Dynamic Type Selector evaluates only the selected branch, so unselected branches do not need to run.

The input_N labels are numbered from zero: input_0 is the first slot, input_1 is the second, and so on. Index outputs use those same numbers. A slot can remain empty until you connect something to it.

There are several ways to make a choice:

  • By number: Select an input_N index.
  • By name: Give each Dynamic Dictionary input a key, then select that key.
  • By condition: Use a boolean toggle to choose between two configured options.
  • At random: Let the node pick an eligible input each run; optionally provide weights to influence the odds.

Groups add a second level of choice. A Dynamic Group bundles related items into one GROUP connection. A Dynamic Group Selector then chooses both the group and an item inside it—like choosing an asset folder first, then a particular asset in that folder.

Iterators work differently from selectors. They produce a list of values, and ComfyUI runs connected downstream nodes once per value. For example, a Float Iterator connected to a sampler’s CFG input lets you compare several CFG settings in one queued run.

comfyui-dynamic-selector Features

Dynamic Type Selector

Use Dynamic Type Selector as a flexible switch for connected data such as images, latents, models, or strings.

  • Right-click the node to add or remove input_N slots. The context menu also supports batch changes, up to 99 inputs.
  • Connect an input to establish the node’s data type. The output follows the connected type; when no inputs are connected, it returns to an unrestricted (“any”) type.
  • Set select to the zero-based index you want to pass through. The index output reports the index chosen for that run.
  • Enable use_bool_item to choose between the indices in item_true and item_false. While this is enabled, select is ignored.
  • Enable random_selection to choose among connected inputs at run time. Without a Weighted Randomizer, each eligible input has an equal chance. Manual selection controls are disabled while random selection is on.

For example, connect three candidate images and change select from 0 to 2 to send the third image downstream without moving any links.

Dynamic Type Selector example

Adding inputs from the context menu

Batch add and remove inputs

Boolean selection example

Dynamic Dictionary

Dynamic Dictionary is a switch whose branches have names. Each numbered input has a matching editable key field (key_0, key_1, and so on). You could name branches portrait, landscape, and detail rather than remembering their numbers.

  • Choose a key with selection, or enable use_bool_item and configure item_true and item_false for conditional key selection.
  • OUTPUT passes through the chosen input’s value. KEY outputs its resolved name as text, which you can use elsewhere in the workflow.
  • A blank key falls back to key_N, where N is its input number.
  • If multiple branches have the same key, the first matching branch is selected. Unique names make the result easier to predict.
  • random_selection chooses among connected input indices. You can connect a Weighted Randomizer to bias those choices; manual key-selection controls are disabled in random mode.
  • type_strict checks for mismatched ComfyUI data types and raises an error when connected values do not match. If input 0 is already connected when you turn on strict typing, mismatched items are disconnected immediately.

Like Dynamic Type Selector, it supports context-menu and batch changes to its inputs, up to 99 slots.

Be careful when mixing types: The output type can change with the selected input. If it no longer matches the type expected by a downstream node, ComfyUI may disconnect that link.

Dynamic Dictionary with named image choices

Dynamic Group and Dynamic Group Selector

Dynamic Group packs multiple inputs of the same type into one GROUP output. Add or remove its input slots through the context menu. This is helpful when you want to keep related images, models, or other assets together.

Dynamic Group Selector opens that collection for selection:

  1. Choose a connected group using select_group.
  2. Choose the item inside that group using index.
  3. Pass the item onward through OUTPUT.

The node’s group_index output reports the chosen group’s input_N index, while its index output reports the chosen item’s position within that group.

Enable Type Strict if all connected groups must contain the same data type. A mismatch raises an error and stops execution. Leave it off when your workflow needs more flexibility.

With random_selection on, the node randomly chooses a connected group, then randomly chooses an item within that group. A Weighted Randomizer can influence the group choice, but the choice of item inside that group remains uniform. The manual group and item controls are disabled in random mode.

Grouping assets and selecting an item

Group type-checking example

Dynamic Combo

Dynamic Combo turns a text list into a searchable dropdown. Enter options in choice_list, select a splitting method, and choose an item from the resulting choice menu. The dropdown updates as you edit the list.

You can separate items by newlines, commas, semicolons, pipes (|), a custom delimiter, or a regular expression. The node outputs the selected string, its zero-based position in the parsed list, and the cleaned-up full list.

For example, enter a list of art directions and send the selected string into a prompt field. You can also use random_selection to pick an item each run. While random mode is on, the manual choice dropdown is disabled.

A Weighted Randomizer can bias Dynamic Combo by list position: index 0 means the first item after splitting. Its weight widgets do not automatically adjust when the list changes. Add enough weights yourself for the options you want to configure, and check them again if you edit choice_list or split_mode. Extra weights are ignored; an eligible item with no corresponding weight uses weight 1.

Weighted Randomizer

Weighted Randomizer supplies integer weights that influence random choices. Connect its weighted_randomizer output to a Dynamic Type Selector, Dynamic Dictionary, Dynamic Group Selector, or Dynamic Combo with random_selection enabled.

Its input_0, input_1, and other weight widgets correspond to branch or list indices. A larger weight makes an eligible option more likely to be chosen. Add or remove weights from the context menu or with the batch dialog.

In ComfyUI Settings → Wakaura → Weighted Randomizer, Sync weight count with linked selector can match the number of weight widgets to the maximum input count across linked Dynamic Type Selector and Dynamic Group Selector nodes. Manual weight add/remove menus are hidden while sync is on. This setting does not sync weights to Dynamic Combo’s parsed list.

Random selection workflow

You can also open the randomizer example workflow to inspect the connections.

Float, Int, and String Iterators

Iterators let you repeat downstream work across a list of values:

NodeWhat you provideExample use
Float IteratorStart, Stop, and Increment decimal valuesCompare several CFG values in a sampler or test model-patcher settings.
Int IteratorStart, Stop, and Increment whole numbersStep through a range of integer settings.
String IteratorA list of text itemsCompare prompts or other text variations.

Float Iterator checks that the increment moves toward the stop value, preventing an endless sequence. It also uses decimal rounding to reduce small floating-point precision errors. String Iterator supports the same splitting methods as Dynamic Combo—newlines, commas, semicolons, pipes, a custom delimiter, or regex—and has Allow Empty Items for cases where empty entries should be passed through.

Float Iterator connected to KSampler

Float Iterator testing FreeU_V2 settings

String Iterator comparing prompts

Settings that affect your workflow

Find these controls in ComfyUI Settings → Wakaura:

SectionSettingEffect
Dynamic SelectorDynamic socket growthAutomatically grow or compact input_N sockets as links are connected or disconnected. Turn it off to manage slots through the context menu only.
Dynamic SelectorAuto-collapse empty inputsWhen socket growth is enabled, trim trailing empty slots and keep indices compact. Recheck indices if your workflow relies on specific slot numbers.
IteratorIterator loop cooldown (seconds)Pause between list steps on supported heavy downstream nodes. 0 disables the pause.
IteratorExtra cooldown nodesUse Search & add nodes… to include additional heavy node types in cooldown behavior.
Weighted RandomizerSync weight count with linked selectorKeep weight-widget counts aligned with linked type/group selector inputs.

Cooldown applies to supported heavy operations, such as core samplers, common VAE encode/decode nodes, and certain upscale nodes. It does not pace lightweight preparation steps. For long iterator runs, a modest pause—for example, 2–10 seconds—may help manage thermals or VRAM pressure, though it will make those runs take longer.

What's New with comfyui-dynamic-selector

The provided documentation identifies these pack updates:

VersionChangesWhy it matters
1.3.00Added Weighted Randomizer, random_selection, and the extension settings API.You can introduce repeatable workflow structure with different choices on each run, and bias how often eligible options are selected.
1.4.00Added iterator loop cooldown and selector index / group_index outputs.You can pace heavy operations during iterator runs and send the chosen indices to other parts of a workflow.

Troubleshooting comfyui-dynamic-selector

  1. Check the data type of the newly connected or selected branch—for example, image versus latent.
  2. Check what type the downstream node expects.
  3. Connect matching types to the selector, or route different types to appropriate downstream nodes.
  4. For Dynamic Dictionary or Dynamic Group Selector, enable strict typing if you want mismatches to produce an explicit error rather than allowing mixed-type choices.

The selector’s output type follows connected data. A link can disconnect when that type no longer matches the next node.

A manual selection control is greyed out

  1. Check whether random_selection is enabled. Turn it off to choose manually.
  2. On Dynamic Type Selector or Dynamic Dictionary, check use_bool_item. When it is enabled, the main selection control is ignored in favor of the configured true/false options.

Random choices or weights do not match my options

  1. Confirm that the choices you expect are connected. Selector random mode chooses among connected branches.
  2. Match each weight to the correct zero-based input_N or parsed-list index.
  3. For Dynamic Combo, recheck the weight count and positions after editing choice_list or split_mode; its options do not auto-sync to Weighted Randomizer.
  4. For linked Dynamic Type Selector or Dynamic Group Selector nodes, check whether Sync weight count with linked selector is enabled in Settings if you expect the widget count to adjust automatically.

Dynamic Dictionary selects the wrong named item

Check for duplicate keys. If several items have the same name, the first matching one is used. Rename the keys so each branch has a unique, recognizable name. A blank key resolves to key_N.

Type Strict stops my workflow

A connected value or group has a different ComfyUI data type from the others. Review the connected branches, replace the mismatched data, or turn off strict typing if your workflow intentionally mixes types. On Dynamic Dictionary, enabling type_strict with input 0 connected can immediately disconnect mismatched items.

An iterator example workflow reports a missing Text Format node

The example iterator workflows use ComfyUI’s newer native Text Format node. Update ComfyUI, or replace that node with an alternative that makes the connections you need. The author reports testing these examples with ComfyUI 0.24.1.

Frequently asked questions

Do I need a separate model for this extension?
No extension-specific model is described. These nodes organize and route the data already available in your ComfyUI workflow; you still use your usual generation models and nodes.

Does random selection weight every item inside a Dynamic Group?
No. Weighted Randomizer can bias which group is chosen. The item inside the selected group is chosen uniformly.

Will cooldown slow every node in my iterator workflow?
No. It pauses between iterator list steps on supported heavy downstream nodes, not on every lightweight step. A cooldown value of 0 turns it off.

How many dynamic selector inputs can I add?
Dynamic Type Selector and Dynamic Dictionary support up to 99 inputs.

Learn More about comfyui-dynamic-selector

The example workflows are a practical place to start: open one in ComfyUI, follow its connections, and replace the sample inputs with your own assets or prompts.

ResourceWhat it demonstrates
example_workflow.jsonBasic Dynamic Type Selector use
example_workflow_gs.jsonDynamic Group and Group Selector
example_workflow_iterator.jsonFloat and string iterators
example_workflow_randomizer.jsonRandom selection with Weighted Randomizer
QwenImage2.1_FacialExpressions in the workflows folderUsing a String Iterator to create 27 facial expressions in one run

For another visual reference, see the updated String Iterator screenshot.

comfyui-dynamic-selector Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

comfyui-dynamic-selector detailed guide | ComfyUI