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_selectionand setselect_groupandindexto the group and item positions you want. Count from0in both cases. - For variety, turn on
random_selectionand 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_randomizerwith weights aligned to group numbers. For example, weights[3, 1]favorinput_0overinput_1when both groups are eligible; they do not favor particular items inside either group. - Turn on
type_strictwhen 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_INDEXandINDEXto 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 group1requiresinput_1. - Solution: Connect the corresponding group input, or change
select_groupto 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_0or 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,
indexis negative or is greater than the last available position in the chosen group. A group withCitems has valid positions from0throughC - 1. - Solution: Set
indexto a valid position, or add items to the group. IfCis0, 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_strictis 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_strictonly 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.
