Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance creative prompts by mixing elements for varied AI-generated outputs with control over randomness and distribution.
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.
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.
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.
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.
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.
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.
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.
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.
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.
keep_first parameter to protect the initial sections from mixing.mode settings to achieve various distribution patterns of mix tokens, which can significantly alter the creative output.seed parameter to reproduce specific results, which is helpful when fine-tuning prompts for consistent artistic outputs.prompt_base and prompt_mix contain valid text. Ensure they are not left as empty strings unless intentionally desired.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.