ComfyUI Node: shuffle

Class Name

Basic data handling: DataListShuffle

Category
Basic/Data List
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling 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

shuffle Description

DataListShuffle node randomly rearranges list elements with a seed for reproducible shuffling.

shuffle:

The DataListShuffle node is designed to rearrange the elements of a list in a random order, providing a shuffled version of the original list. This node is particularly useful when you need to introduce randomness into your data processing workflow, such as when creating randomized datasets or when you want to ensure that the order of elements does not influence the outcome of subsequent operations. By using a seed value, the node ensures that the shuffling process is reproducible, meaning that the same input list and seed will always produce the same shuffled output. This feature is beneficial for debugging and for scenarios where consistent results are required across different runs.

shuffle Input Parameters:

list

The list parameter is the primary input for the DataListShuffle node, representing the collection of items you wish to shuffle. This parameter can accept any type of list, including those containing mixed data types such as integers, strings, and booleans. The function of this parameter is to provide the data that will be rearranged in a random order. There are no specific minimum or maximum values for this parameter, as it is designed to handle lists of any length, including empty lists.

seed

The seed parameter is an integer that determines the randomness of the shuffle operation. By setting a specific seed value, you ensure that the shuffle operation is deterministic, meaning that the same input list and seed will always result in the same shuffled list. This is particularly useful for reproducibility in experiments or when you need consistent results across multiple runs. The default value for the seed is 0, but you can specify any integer value to achieve different shuffle results.

shuffle Output Parameters:

list

The output list parameter is the shuffled version of the input list. This parameter provides a new list where the elements have been rearranged in a random order based on the specified seed. The importance of this output lies in its ability to introduce randomness into your data processing tasks while maintaining the integrity of the original list, which remains unchanged. The output list will have the same elements as the input list, but in a different order, and it will always be a permutation of the input list.

shuffle Usage Tips:

  • To ensure reproducibility, always use the same seed value when you need consistent shuffle results across different runs.
  • When working with lists containing mixed data types, ensure that the elements are comparable if you plan to perform operations that require sorting or comparison after shuffling.
  • Use the DataListShuffle node to randomize datasets before training machine learning models to prevent overfitting and ensure that the model learns from a diverse set of examples.

shuffle Common Errors and Solutions:

Invalid seed value

  • Explanation: The seed value provided is not an integer, which is required for the shuffle operation.
  • Solution: Ensure that the seed parameter is set to an integer value. If you are using a variable to set the seed, verify that it holds an integer.

List is not iterable

  • Explanation: The input provided for the list parameter is not a valid list or iterable object.
  • Solution: Check that the input for the list parameter is indeed a list. If you are using a variable, ensure it contains a list or an iterable object.

shuffle Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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.

shuffle