ComfyUI > Nodes > ComfyUI-PromptUtilities > Random Preset

ComfyUI Node: Random Preset

Class Name

PromptUtilitiesRandomPreset

Category
PromptUtilities
Author
nkchocoai (Account age: 825days)
Extension
ComfyUI-PromptUtilities
Latest Updated
2025-03-30
Github Stars
0.03K

How to Install ComfyUI-PromptUtilities

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

Facilitates creative prompt generation by selecting random presets, ensuring reproducibility.

Random Preset:

The PromptUtilitiesRandomPreset node is designed to facilitate the generation of creative prompts by randomly selecting from a set of predefined presets. This node is particularly useful for AI artists who wish to explore a variety of prompt configurations without manually crafting each one. By leveraging randomness, it introduces an element of surprise and creativity, allowing users to discover new and unexpected prompt combinations. The node's primary function is to select a random preset based on a given seed, ensuring reproducibility of results if the same seed is used. This capability is essential for artists looking to experiment with different prompt styles while maintaining control over the randomness through the seed parameter.

Random Preset Input Parameters:

filename

The filename parameter specifies the list of available preset filenames from which a random preset will be selected. This parameter is crucial as it determines the pool of presets that the node can choose from. The list is dynamically generated by the PresetManager, ensuring that all available presets are considered. There are no specific minimum or maximum values for this parameter, as it is a list of strings representing filenames.

choice_preset

The choice_preset parameter is a string input that allows for multiline text but does not support dynamic prompts. This parameter is used to specify the preset choice in a structured format, which the node will parse to extract the relevant prompt details. It is essential for defining the structure and content of the preset to be used.

seed

The seed parameter is an integer that serves as the basis for the random number generation process. It ensures that the selection of presets is reproducible; using the same seed will yield the same random preset selection. The default value is 0, with a minimum of 0 and a maximum of 0xffffffffffffffff, providing a vast range of possible seed values for varied randomness.

Random Preset Output Parameters:

STRING

The output of the PromptUtilitiesRandomPreset node is a single string that represents the randomly selected preset. This output is the result of parsing the choice_preset parameter and selecting a preset based on the provided seed. The string encapsulates the details of the chosen preset, which can then be used in further processing or as a direct input for AI models.

Random Preset Usage Tips:

  • To ensure consistent results when experimenting with different presets, use the same seed value. This will allow you to reproduce the same random selection across different sessions.
  • Explore the variety of available presets by changing the seed value frequently. This can lead to discovering new and interesting prompt combinations that you might not have considered manually.

Random Preset Common Errors and Solutions:

Invalid filename

  • Explanation: This error occurs when the specified filename does not exist in the list of available presets.
  • Solution: Ensure that the filename provided is correct and matches one of the available preset filenames listed by the PresetManager.

Seed out of range

  • Explanation: This error happens when the seed value provided is outside the acceptable range.
  • Solution: Verify that the seed value is within the range of 0 to 0xffffffffffffffff and adjust it accordingly.

Random Preset Related Nodes

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