ComfyUI > Nodes > comfyui-adaptiveprompts > Prompt Mixer 🥣

ComfyUI Node: Prompt Mixer 🥣

Class Name

PromptMixer

Category
prompt
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 Mixer 🥣 Description

Enhance creative prompts by mixing elements for varied AI-generated outputs with control over randomness and distribution.

Prompt Mixer 🥣:

The PromptMixer is a versatile tool designed to enhance your creative process by seamlessly integrating elements from a secondary prompt into a primary one. This node is particularly beneficial for AI artists looking to enrich their textual prompts with additional layers of complexity and nuance. By allowing you to mix tokens from a prompt_mix into a prompt_base, the PromptMixer offers a dynamic way to generate more varied and interesting outputs. It provides several modes of operation, such as SPRINKLE and RANDOM, which determine how the mix tokens are distributed within the base prompt. This flexibility enables you to control the randomness and distribution of the inserted tokens, making it easier to achieve the desired artistic effect. The node also supports deterministic operations through a seed, ensuring that you can reproduce results consistently if needed. Overall, the PromptMixer is an essential tool for anyone looking to experiment with and expand the creative possibilities of their AI-generated content.

Prompt Mixer 🥣 Input Parameters:

prompt_base

This parameter represents the main prompt that you wish to modify. It serves as the foundation upon which additional tokens from the prompt_mix will be inserted. The prompt_base is a string that can be multiline and is typically comma-separated by default. It is crucial as it defines the initial context and structure of your output. The default value is an empty string.

prompt_mix

The prompt_mix is a secondary prompt that provides the tokens to be inserted into the prompt_base. Like the prompt_base, it is a string that can be multiline and is usually comma-separated. This parameter allows you to introduce new elements and ideas into your base prompt, enhancing its complexity and depth. The default value is an empty string.

keep_first

This integer parameter specifies the number of initial sections in the prompt_base that should be protected from any mixing. By setting this value, you can ensure that the beginning of your base prompt remains unchanged, preserving its original intent or context. The minimum value is 0, and the default is also 0.

shuffle_mix_in

This boolean parameter determines whether the mix tokens should be randomized after their insertion positions are chosen. If set to True, the tokens will be assigned to the chosen positions in a randomized order, adding an element of unpredictability to the output. If False, the tokens will be inserted in their original order. The default value is False.

mode

The mode parameter defines the strategy for choosing insertion slots for the mix tokens. Options include SPRINKLE, RANDOM, RANDOM_EXPONENTIAL, RANDOM_SQRT, and RANDOM_MIDDLE, each offering a different distribution pattern. For example, SPRINKLE spreads tokens evenly, while RANDOM selects slots uniformly at random. The default mode is SPRINKLE.

seed

This is a deterministic 64-bit integer seed used to ensure reproducibility of results. By setting a specific seed, you can achieve consistent outputs across multiple runs, which is particularly useful for iterative creative processes. The seed can range from 0 to a very large number (0xffffffffffffffff), with 0 being allowed as a valid seed. The default value is 0.

delimiter

The delimiter is a string used to split and join tokens within the prompts. By default, it is set to a comma (,), which is common for separating elements in a list. This parameter allows you to customize how the prompts are tokenized and reassembled, providing flexibility in how the text is structured. The default value is a comma.

Prompt Mixer 🥣 Output Parameters:

mixed_prompt

The output of the PromptMixer is a tuple containing the modified prompt, referred to as mixed_prompt. This output represents the prompt_base with tokens from the prompt_mix inserted according to the specified parameters. The mixed_prompt is crucial as it embodies the final creative output, reflecting the integration of new elements into the original prompt. It provides a richer and more varied textual input for further processing or generation tasks.

Prompt Mixer 🥣 Usage Tips:

  • To maintain the original context of your base prompt while adding new elements, use the keep_first parameter to protect the initial sections from mixing.
  • Experiment with different mode settings to achieve various distribution patterns of mix tokens, which can significantly alter the creative output.
  • Utilize the seed parameter to reproduce specific results, which is helpful when fine-tuning prompts for consistent artistic outputs.

Prompt Mixer 🥣 Common Errors and Solutions:

Invalid delimiter

  • Explanation: The delimiter used for splitting tokens is not valid or not set correctly.
  • Solution: Ensure that the delimiter is a valid string and matches the format used in your prompts. The default is a comma, so adjust accordingly if your prompts use a different separator.

Empty prompt_base or prompt_mix

  • Explanation: One or both of the prompts are empty, leading to no meaningful output.
  • Solution: Check that both prompt_base and prompt_mix contain valid text. Ensure they are not left as empty strings unless intentionally desired.

Seed value out of range

  • Explanation: The seed value provided is outside the acceptable range.
  • Solution: Ensure the seed is a 64-bit integer within the range of 0 to 0xffffffffffffffff. Adjust the seed value to fall within this range.

Prompt Mixer 🥣 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.