Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance creative prompts by dynamically swapping tags with aliases for AI artists seeking variability and creativity.
The PromptAliasSwap node is designed to enhance your creative process by dynamically swapping specific tags or tokens in your input prompts with aliases from predefined groups. This node is particularly useful for AI artists who want to introduce variability and creativity into their prompts without manually editing each one. By leveraging alias groups, the node ensures that your prompts remain fresh and diverse, while preserving the original structure and non-tag elements such as punctuation, whitespace, and weights. The node operates by identifying candidate tokens based on specific rules and replacing them with alternatives from the alias group, which can be refreshed live if needed. This functionality allows for a seamless integration of variability into your creative workflow, making it an invaluable tool for generating unique and adaptive prompts.
This parameter represents the input prompt that you want to process. It is a multiline string, allowing you to input complex prompts that may span multiple lines. The node will analyze this string to identify and swap tags based on the alias groups.
The seed parameter is an integer that influences the randomness of the alias swapping process. By setting a specific seed, you can ensure consistent results across multiple runs. The default value is 0, with a minimum of 0 and a maximum of 2,147,483,647.
This parameter allows you to select a .txt file containing alias groups from the tag_alias folder. The default file is tags.txt. This file dictates which aliases are available for swapping, and it is crucial for defining the variability in your prompts. Note that .csv format is not supported.
The mode parameter determines the behavior of the alias swapping process. It offers two options: "ALWAYS" and "RANDOM". In "ALWAYS" mode, the node will always swap to a different alias from the same group, ensuring variability. In "RANDOM" mode, the node may re-select the same alias, meaning the tag might remain unchanged. The default setting is "ALWAYS".
This parameter defines the probability that a tag will be swapped. It is a float value ranging from 0.0 to 1.0, with a default of 1.0. A higher value increases the likelihood of a swap occurring, while a lower value reduces it, allowing for controlled variability in your prompts.
The refresh_file parameter is a boolean that determines whether the alias file should be re-read and the cache refreshed. If set to True, the node will update its alias groups based on the latest file contents, ensuring that any changes to the alias file are reflected in the swapping process. The default value is False.
The output of the PromptAliasSwap node is a single string, referred to as the "Aliased String". This string is the result of processing the input prompt with the alias swapping logic. It retains the original structure and non-tag elements of the input while incorporating the variability introduced by the alias groups. This output is crucial for generating diverse and adaptive prompts that can inspire new creative directions.
chance parameter to control the level of variability in your prompts. A lower chance value can be useful when you want to maintain more of the original prompt structure.tag_alias folder.tag_alias folder.refresh_file parameter is set to False, changes to the alias file may not be reflected in the swapping process.refresh_file parameter to True to ensure that the node reads the latest version of the alias file and updates the cache accordingly.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.