Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate dynamic text prompts from templates with placeholders for AI art and storytelling, ensuring reproducibility and creativity.
The "Prompt from template 🪴" node is designed to help you generate dynamic and varied text prompts based on a predefined template. This node is particularly useful for AI artists who want to create diverse and creative prompts without manually writing each one. By using a template with placeholders, you can automatically replace these placeholders with random or specific items from predefined lists, making your prompt generation process more efficient and creative. The node leverages a seed value to ensure reproducibility, allowing you to generate the same prompt multiple times if needed. This functionality is ideal for generating prompts for AI art generation, storytelling, or any other creative endeavor that requires varied text inputs.
The template
parameter is a string that contains the text template with placeholders that will be replaced by items from predefined lists. The placeholders are enclosed in square brackets, e.g., [list_name]
. You can also specify the number of items to be replaced by using a comma, e.g., [list_name, 3]
. This parameter supports multiline input and dynamic prompts, allowing for complex and varied prompt generation. The default value is an empty string.
The seed
parameter is an integer that sets the seed for the random number generator used in the prompt generation process. This ensures that the same template and seed will always produce the same prompt, providing reproducibility. The seed value can range from 0 to 0xFFFFFFFFFFFFFFFF, with a default value of 0.
The output is a single string that contains the generated prompt with all placeholders replaced by items from the predefined lists. This string can be used directly as an input for other nodes or processes that require text prompts.
item_count
feature to generate multiple items from a list, adding more diversity to your prompts.class_type
property defined.class_type
property correctly defined.{class_type}
does not exist.class_type
does not exist in the NODE_CLASS_MAPPINGS
.class_type
is correctly spelled and exists in the NODE_CLASS_MAPPINGS
.© Copyright 2024 RunComfy. All Rights Reserved.