ComfyUI > Nodes > ComfyUI-LogicUtils > Random Shuffle String

ComfyUI Node: Random Shuffle String

Class Name

RandomShuffleString

Category
Logic Gates
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

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

Random Shuffle String Description

Shuffles a list of strings randomly, with optional seed for repeatable results.

Random Shuffle String:

The RandomShuffleString node is designed to take a list of strings and shuffle them randomly, providing a new order each time it is executed. This node is particularly useful when you need to introduce randomness into your string data, such as when creating varied outputs or testing different configurations. By using a seed value, you can ensure that the shuffling process is repeatable, allowing for consistent results across different runs if desired. This node is a valuable tool for AI artists looking to add an element of unpredictability to their projects, while still maintaining control over the randomness through the use of a seed.

Random Shuffle String Input Parameters:

input_string

The input_string parameter is a string that contains the list of items you want to shuffle. These items should be separated by a specific character, which you will define using the separator parameter. The default value is "a$b$c", which means the string will be split into a list of ["a", "b", "c"] before shuffling. This parameter is crucial as it determines the initial set of strings that will be randomized.

separator

The separator parameter defines the character used to split the input_string into individual items. By default, this is set to "$", but you can change it to any character that suits your data format. The separator is essential for correctly parsing the input string into a list that can be shuffled.

seed

The seed parameter is an integer that initializes the random number generator used for shuffling. It allows you to produce the same shuffled order across different runs if the same seed is used. The default value is 0, and it can range from 0 to 2^63-1. Using a specific seed is helpful when you need reproducible results for testing or consistency purposes.

Random Shuffle String Output Parameters:

STRING

The output of the RandomShuffleString node is a tuple containing a single element: a list of strings that have been shuffled. This output reflects the new order of the strings as determined by the random shuffle process. The shuffled list can be used in subsequent nodes or processes where a randomized order of strings is required.

Random Shuffle String Usage Tips:

  • To ensure consistent shuffling results across different runs, use the same seed value. This is particularly useful for testing or when you need to replicate results.
  • Experiment with different separators if your input data uses a unique character to separate items. This will ensure the node correctly parses your input string.

Random Shuffle String Common Errors and Solutions:

Invalid separator

  • Explanation: If the separator does not match the character used in the input_string, the node may not correctly split the string into a list.
  • Solution: Double-check that the separator matches the character used in your input_string to separate items.

Seed out of range

  • Explanation: If the seed value is outside the allowed range, the node may not function correctly.
  • Solution: Ensure the seed value is within the range of 0 to 2^63-1. Adjust the seed value accordingly.

Random Shuffle String Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LogicUtils
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.

Random Shuffle String