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 > Dynamic Group Selector

ComfyUI Node: Dynamic Group Selector

Class Name

DynamicGroupSelector

Category
Wakaura
Author
wakaura-asaho (Account age: 544days)
Extension
comfyui-dynamic-selector
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

Dynamic Group Selector Description

Selects an item from connected groups by index or weighted random choice, with optional type checks.

Dynamic Group Selector:

DynamicGroupSelector takes an item from one of several connected groups and passes it to the next part of your workflow. You can choose the group and item directly for a repeatable result, or let the node choose a nonempty group and an item at random. This makes it useful when you have several collections of creative assets or settings and want one workflow to work with different selections. It can also check that connected groups report consistent data types, helping you catch incompatible connections before using the selected item.

Dynamic Group Selector Input Parameters:

select_group

The zero-based number of the group input to use when random selection is off: 0 refers to input_0, 1 to input_1, and so on. The selected group must be connected. When random selection is on, the node chooses a group itself and replaces this setting for that execution. Type: INT. The provided source does not specify a minimum, maximum, or default.

index

The zero-based position of the item within the chosen group when random selection is off. For example, 0 selects the first item and 1 selects the second. The value must be at least 0 and less than the number of items in that group; an empty group has no valid index. When random selection is on, the node chooses an item position itself. Type: INT. The provided source does not specify a configured minimum, maximum, or default; the valid execution-time maximum depends on the chosen group's size.

type_strict

Controls whether the node checks connected dynamic group inputs for consistent underlying types. With true, it raises an error when it finds different reported types; with false, it skips that check. This is useful when you want to prevent a selection from switching between incompatible kinds of data. Type: BOOLEAN. Options: true or false. Default: false; minimum and maximum are not applicable.

random_selection

Controls whether the node chooses a group and an item randomly. With true, it considers connected group inputs that have values, selects among those containing at least one item, then chooses an item position uniformly within the selected group. With false, it uses select_group and index. Type: BOOLEAN. Options: true or false. The provided source does not specify this input's default; minimum and maximum are not applicable.

weighted_randomizer

An optional W_RANDOMIZER input that can influence which group is chosen when random_selection is on. The selection code accepts a list of weights indexed by group number: larger positive weights make a group more likely to be chosen, zero or negative weights exclude it, and a missing weight for an eligible group is treated as 1. If it cannot use the supplied value as a weight list, it chooses uniformly among eligible groups; if no eligible group has a positive weight, it also falls back to a uniform choice. Weights do not change which item is picked within the chosen group. The provided source does not specify a default, minimum, or maximum for this optional input.

input_0

An optional GROUP input for a collection of items. It is the group selected by select_group = 0 in direct-selection mode and can be considered in random mode when connected and nonempty. A compatible Dynamic Group node produces a group containing its collected items and a type label. The node accepts additional dynamic group inputs at execution time, but input_0 is the only group socket explicitly listed in the provided interface. The provided source does not specify a default, minimum, or maximum for this input.

Dynamic Group Selector Output Parameters:

OUTPUT

The selected item itself. Its output type is *, so the value depends on what the chosen group contains; it could, for example, be an image or another kind of workflow data. This is the value to connect to the next node that will use the selection.

GROUP_INDEX

The zero-based number of the group from which OUTPUT came. This INT value equals select_group in direct-selection mode and reports the group actually chosen in random mode. Use it when you need to identify which collection supplied the item.

INDEX

The zero-based position of OUTPUT within its chosen group. This INT value equals index in direct-selection mode and reports the position actually chosen in random mode. Together with GROUP_INDEX, it identifies the selection made for that execution.

Dynamic Group Selector Usage Tips:

  • For a repeatable selection, turn off random_selection and set select_group and index to the group and item positions you want. Count from 0 in both cases.
  • For variety, turn on random_selection and connect at least one nonempty group. The node chooses only among group inputs that have values and contain items.
  • To favor particular groups, connect weighted_randomizer with weights aligned to group numbers. For example, weights [3, 1] favor input_0 over input_1 when both groups are eligible; they do not favor particular items inside either group.
  • Turn on type_strict when downstream nodes expect one consistent kind of data. If your groups intentionally contain different kinds of items, leave it off, but ensure the next node can handle whichever item is selected.
  • Use GROUP_INDEX and INDEX to see which item was picked during random selection. Random selection also causes the node to request a fresh execution rather than reuse its usual selection fingerprint.

Dynamic Group Selector Common Errors and Solutions:

Input 'input_N' must be connected for selection N.

  • Explanation: In direct-selection mode, there is no group input matching the number set in select_group. For example, selecting group 1 requires input_1.
  • Solution: Connect the corresponding group input, or change select_group to the number of a connected group.

At least one group input must be connected.

  • Explanation: Random selection was requested, but validation found no dynamic group input to choose from.
  • Solution: Connect a group to input_0 or another available dynamic group input.

Dynamic Group Selector: No valid group inputs to select from.

  • Explanation: During random selection, none of the dynamic group inputs supplied a value.
  • Solution: Check that at least one group is connected and provides a value when the workflow runs.

Dynamic Group Selector: No connected group contains items.

  • Explanation: Random selection found group inputs, but every group available for selection was empty.
  • Solution: Add an item to at least one connected group before running the selector.

Dynamic Group Selector: GROUP input 'input_N' is not connected.

  • Explanation: The selected group has no value at execution time. This can occur even when the requested group input is present but supplies None.
  • Solution: Check the connection and the upstream group node's result, or select a group that supplies data.

Dynamic Group Selector: Index N is out of bound. The group G has C item(s).

  • Explanation: In direct-selection mode, index is negative or is greater than the last available position in the chosen group. A group with C items has valid positions from 0 through C - 1.
  • Solution: Set index to a valid position, or add items to the group. If C is 0, add at least one item before selecting from it.

Dynamic Group Selector: Inconsistent types: input_N is 'TYPE', but input_M is 'TYPE'.

  • Explanation: type_strict is on, and connected dynamic inputs report different underlying types. The error identifies the differing inputs and their reported types.
  • Solution: Connect groups containing the same kind of data, or turn off type_strict only when the next node can handle the different possible results.

TypeError or KeyError while reading group data

  • Explanation: The selector expects a group value it can count and index, or a group dictionary containing usable data. A malformed or unsupported value can fail those operations.
  • Solution: Supply a compatible group, such as the output of Dynamic Group, and check that its data contains a collection of items.

Dynamic Group Selector Related Nodes

Go back to the extension to check out more related nodes.
comfyui-dynamic-selector
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.

Dynamic Group Selector