ComfyUI > Nodes > comfyui-mixlab-nodes > Random Prompt ♾️Mixlab

ComfyUI Node: Random Prompt ♾️Mixlab

Class Name

RandomPrompt

Category
♾️Mixlab/Prompt
Author
shadowcz007 (Account age: 3323days)
Extension
comfyui-mixlab-nodes
Latest Updated
2024-06-23
Github Stars
0.9K

How to Install comfyui-mixlab-nodes

Install this extension via the ComfyUI Manager by searching for comfyui-mixlab-nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-mixlab-nodes 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Random Prompt ♾️Mixlab Description

Generate diverse prompts by combining text inputs, aiding AI artists in creating unique outputs with randomness.

Random Prompt ♾️Mixlab:

The RandomPrompt node is designed to generate a variety of prompts by combining mutable and immutable text inputs. This node is particularly useful for AI artists who want to create diverse and dynamic prompts for their projects. By leveraging the ability to mix and match different text elements, the RandomPrompt node helps in producing unique and creative outputs. It can also randomly sample a specified number of prompts from the generated list, adding an element of unpredictability and creativity to the process. This node is essential for those looking to explore a wide range of prompt combinations without manually crafting each one.

Random Prompt ♾️Mixlab Input Parameters:

max_count

This parameter defines the maximum number of prompts to generate. It controls the upper limit of the output list, ensuring that the number of generated prompts does not exceed this value. The minimum value is 1, the maximum value is 1000, and the default value is 9. Adjusting this parameter allows you to manage the volume of generated prompts according to your needs.

mutable_prompt

This is a multiline string input where you can provide the text that will be dynamically combined with the immutable prompt. Each line in this input represents a different mutable element that can be mixed with the immutable prompt. The default value is an empty string. This parameter is crucial for introducing variability and creativity into the generated prompts.

immutable_prompt

This is another multiline string input, but unlike the mutable prompt, this text remains constant in the generated prompts. Each line in this input represents a different immutable element that will be combined with the mutable prompt. The default value is 'sticker, Cartoon, ``'. This parameter ensures that certain elements of the prompt remain consistent, providing a stable base for the mutable elements to interact with.

random_sample

This parameter determines whether the node should randomly sample a specified number of prompts from the generated list. It accepts two options: "enable" and "disable". When set to "enable", the node will randomly select prompts up to the max_count value. When set to "disable", the node will take the first max_count prompts from the list. This parameter adds flexibility in how the prompts are selected, allowing for either a random or sequential approach.

seed (optional)

This optional parameter allows you to set a seed value for the random sampling process. It accepts any integer value, with a default of 0. By setting a seed, you can ensure reproducibility in the random sampling process, which is useful for generating consistent results across different runs.

Random Prompt ♾️Mixlab Output Parameters:

prompts

The output of the RandomPrompt node is a list of generated prompts. Each prompt is a combination of the mutable and immutable text inputs, processed according to the specified parameters. This output is essential for providing a diverse set of prompts that can be used in various creative projects. The prompts are returned as a list of strings, each representing a unique combination of the input elements.

Random Prompt ♾️Mixlab Usage Tips:

  • To maximize creativity, provide a diverse set of lines in both the mutable and immutable prompts. This will result in a wider range of unique combinations.
  • Use the random_sample parameter to introduce an element of unpredictability in your prompts, which can lead to more innovative and unexpected results.
  • Adjust the max_count parameter based on your project's needs. For larger projects, a higher max_count can provide more options, while a lower max_count can help focus on a smaller set of high-quality prompts.
  • Utilize the seed parameter if you need to reproduce the same set of random prompts across different runs, ensuring consistency in your creative process.

Random Prompt ♾️Mixlab Common Errors and Solutions:

"No prompts generated"

  • Explanation: This error occurs when the combination of mutable and immutable prompts results in an empty list.
  • Solution: Ensure that both mutable and immutable prompts contain valid text elements. Avoid leaving them empty or filled with only whitespace.

"Invalid max_count value"

  • Explanation: This error occurs when the max_count parameter is set outside the allowed range (1-1000).
  • Solution: Adjust the max_count parameter to a value within the specified range to ensure proper execution.

"Random sampling failed"

  • Explanation: This error occurs when the random_sample parameter is set to "enable" but the number of generated prompts is less than the max_count.
  • Solution: Ensure that the combination of mutable and immutable prompts can generate at least as many prompts as the max_count value. If necessary, reduce the max_count value or provide more input lines in the prompts.

Random Prompt ♾️Mixlab Related Nodes

Go back to the extension to check out more related nodes.
comfyui-mixlab-nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.