ComfyUI > Nodes > comfyui-adaptiveprompts > Prompt Shuffle ♻️

ComfyUI Node: Prompt Shuffle ♻️

Class Name

PromptShuffle

Category
adaptiveprompts/processing
Author
Alectriciti (Account age: 5005days)
Extension
comfyui-adaptiveprompts
Latest Updated
2025-11-05
Github Stars
0.05K

How to Install comfyui-adaptiveprompts

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

Prompt Shuffle ♻️ Description

Enhance creative process by shuffling prompt tags in a controlled manner for AI artists to generate diverse outputs.

Prompt Shuffle ♻️:

PromptShuffle is a versatile node designed to enhance the creative process by allowing you to shuffle and rearrange prompt tags in a controlled and deterministic manner. This node is particularly useful for AI artists who want to experiment with different prompt configurations to generate diverse outputs. By utilizing a progressive, seedable, and direction-aware shuffling mechanism, PromptShuffle ensures that the rearrangement of prompt tags is both predictable and customizable. This node provides the flexibility to maintain the integrity of the original tokens while offering various modes and algorithms to control the shuffling process. Whether you want to perform a complete randomization or a more subtle reordering, PromptShuffle offers the tools to achieve your desired outcome, making it an essential component for adaptive prompt processing.

Prompt Shuffle ♻️ Input Parameters:

string

This parameter represents the input string containing the prompt tags you wish to shuffle. It is crucial as it serves as the base content that will be manipulated by the node. The default value is an empty string, and it should be formatted according to the separator you choose.

separator

The separator is a string that defines how the input string is split into individual tokens or tags. It is essential for correctly parsing the input string into manageable parts. The default value is a comma (,), but you can adjust it to match the format of your input string.

shuffle_amount_start

This integer parameter sets the starting point for the amount of shuffling to be applied. It determines the minimum number of positions a token can be moved during the shuffling process. The default value is 0, with a minimum of 0 and a maximum of 999.

shuffle_amount_end

This integer parameter defines the endpoint for the shuffling amount, indicating the maximum number of positions a token can be moved. It works in conjunction with shuffle_amount_start to create a range for shuffling. The default value is 10, with a minimum of 0 and a maximum of 999.

mode

The mode parameter specifies the method of movement for the tokens during shuffling. Options include "WALK," "WALK_FORWARD," "WALK_BACKWARD," and "JUMP." Each mode offers a different approach to rearranging the tokens, from step-by-step movement to complete randomization. This parameter allows you to tailor the shuffling behavior to your specific needs.

algorithm

This parameter determines the algorithm used for shuffling, with options such as "RANDOM," "LINEAR_IN," "LINEAR_OUT," "SHUFFLE_DECAY," and "SHUFFLE_DECAY_REVERSE." Each algorithm provides a unique pattern of shuffling, affecting how the tokens are rearranged over time. This choice impacts the overall randomness and progression of the shuffle.

limit

The limit parameter sets the maximum number of single-item moves (pop and insert operations) to perform during the shuffling process. A value of 0 indicates a full shuffle, completely randomizing the order of tokens. The default value is 0, with a minimum of 0 and a maximum of 1,000,000.

seed

This integer parameter is used to initialize the random number generator, ensuring that the shuffling process is deterministic and repeatable. By setting a specific seed value, you can achieve consistent results across multiple runs. The default value is 0, with a range from 0 to 0xffffffffffffffff.

Prompt Shuffle ♻️ Output Parameters:

shuffled_string

The output parameter shuffled_string is the result of the shuffling process, providing a new arrangement of the input prompt tags based on the specified parameters. This output is crucial for generating varied and creative prompt configurations, allowing you to explore different artistic possibilities. The shuffled string maintains the integrity of the original tokens while reflecting the applied shuffling logic.

Prompt Shuffle ♻️ Usage Tips:

  • To achieve a completely random order of your prompt tags, set the limit parameter to 0, which will perform a full shuffle.
  • Use the seed parameter to ensure consistent results across different runs, which is particularly useful when you want to reproduce specific outcomes.
  • Experiment with different mode and algorithm combinations to discover unique shuffling patterns that can inspire new creative directions.

Prompt Shuffle ♻️ Common Errors and Solutions:

Invalid separator

  • Explanation: The separator provided does not match the format of the input string, leading to incorrect token parsing.
  • Solution: Ensure that the separator accurately reflects the delimiter used in your input string, such as a comma or space.

Shuffle amount out of range

  • Explanation: The values for shuffle_amount_start or shuffle_amount_end exceed the allowed range.
  • Solution: Adjust the shuffle amount values to fall within the specified range of 0 to 999.

Seed value too large

  • Explanation: The seed value exceeds the maximum allowable size.
  • Solution: Ensure the seed value is within the range of 0 to 0xffffffffffffffff to avoid overflow errors.

Prompt Shuffle ♻️ Related Nodes

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