ComfyUI Node: shuffle

Class Name

Basic data handling: ListShuffle

Category
Basic/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

ListShuffle node randomizes list order with a seed for reproducible shuffling across tasks.

shuffle:

The ListShuffle 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 randomize the order of items for tasks such as data augmentation, creating randomized datasets, or simply introducing variability into your workflows. 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 maintaining consistency across different runs or experiments. The node operates on any list, regardless of the data types of its elements, making it versatile for various applications.

shuffle Input Parameters:

list

The list parameter is the primary input for the ListShuffle node, representing the collection of items you wish to shuffle. This parameter accepts any list, allowing for a wide range of data types, including numbers, strings, and mixed types. The list you provide will be copied and shuffled, ensuring that the original list remains unchanged. This parameter is crucial as it determines the set of items that will be rearranged in a random order.

seed

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

shuffle Output Parameters:

list

The output list parameter is the shuffled version of the input list. It contains the same elements as the original list but in a randomized order determined by the seed value. This output is crucial for applications where the order of items needs to be randomized, such as in data processing pipelines or when preparing datasets for machine learning tasks. The output list maintains the same length and elements as the input list, ensuring that no data is lost during the shuffling process.

shuffle Usage Tips:

  • To achieve consistent shuffling results across different runs, always use the same seed value. This ensures that the output list is identical each time you shuffle the same input list with the same seed.
  • When working with lists containing mixed data types, ensure that the elements are compatible with the operations you plan to perform after shuffling, as the node does not alter the data types.

shuffle Common Errors and Solutions:

"TypeError: 'NoneType' object is not iterable"

  • Explanation: This error occurs when the input list is not provided or is set to None.
  • Solution: Ensure that you pass a valid list to the list parameter before executing the node.

"ValueError: Seed must be an integer"

  • Explanation: This error arises when the seed value is not an integer.
  • Solution: Verify that the seed parameter is set to an integer value. If necessary, convert other data types to an integer before using them as a seed.

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