Visit ComfyUI Online for ready-to-use ComfyUI environment
AI prompt generation node for detailed image prompts using advanced language models, enhancing image generation creativity and quality.
The Prompt_Generator
node is designed to assist AI artists in generating detailed and contextually rich prompts for image generation tasks. This node leverages advanced language models to create prompts that can be used with image generation tools like Stable Diffusion. By providing a variety of caption methods, it allows you to generate short, long, or detailed descriptions of images, enhancing the creative process and ensuring high-quality outputs. The main goal of this node is to streamline the prompt creation process, making it easier for you to produce vivid and accurate descriptions that can significantly improve the results of your image generation projects.
This parameter specifies the path to the folder containing the images you want to generate prompts for. It is a required field and should be a string representing the directory path. The default value is "Path to your image folder".
This parameter determines the style of the prompt to be generated. It offers three options: caption
, short_prompt
, and long_prompt
. The caption
option generates a detailed description with relevant tags, short_prompt
creates a concise prompt for image generation, and long_prompt
produces a rich, detailed prompt in the style of Midjourney. The default value is long_prompt
.
This parameter sets the maximum number of new tokens to be generated in the prompt. It is an integer value with a default of 2048, a minimum of 1, and a maximum of 4096. Adjusting this value can control the length and detail of the generated prompt.
This parameter controls the number of beams used in the beam search algorithm during prompt generation. It is an integer value with a default of 3, a minimum of 1, and a maximum of 64. Higher values can improve the quality of the generated prompt but may increase computation time.
This optional parameter allows you to directly input images for which prompts need to be generated. It accepts image files and can be used if you prefer not to specify a folder path.
This optional parameter is a string that forces input of filenames for the images. It is useful when you have specific image files you want to generate prompts for.
This optional parameter is a string that forces input of existing captions for the images. It can be used to refine or build upon existing descriptions.
This optional parameter allows you to add a prefix to the generated captions. It is a multiline string with a default value of an empty string.
This optional parameter allows you to add a suffix to the generated captions. It is a multiline string with a default value of an empty string.
This optional parameter allows you to specify tags that should be replaced in the generated captions. It is a multiline string with a default value of "replace_tags eg:search1:replace1;search2:replace2".
This output parameter returns the images for which prompts were generated. It helps in verifying the generated prompts against the original images.
This output parameter returns the filenames of the images. It helps in identifying which prompts correspond to which images.
This output parameter returns the generated captions or prompts. These are the detailed descriptions or prompts created based on the input images and specified parameters.
This output parameter returns the folder path where the images are stored. It helps in keeping track of the source directory for the images.
This output parameter returns the batch size used during the prompt generation process. It helps in understanding the scale of the operation performed.
long_prompt
option in the caption_method
parameter.max_new_tokens
parameter to control the length of the generated prompts. Higher values will produce more detailed descriptions.prefix_caption
and suffix_caption
parameters to add custom text before or after the generated prompts, enhancing their context and relevance.num_beams
parameter to find the optimal balance between prompt quality and computation time.folder_path
does not exist or is incorrect.folder_path
parameter is set to a valid directory path containing the images.max_new_tokens
parameter is set outside the allowed range.max_new_tokens
parameter to a value between 1 and 4096.num_beams
parameter is set outside the allowed range.num_beams
parameter to a value between 1 and 64.images
parameter is not provided in the correct format.images
parameter is set to valid image files.caption_method
parameter.caption_method
parameter is set to one of the following options: caption
, short_prompt
, or long_prompt
.© Copyright 2024 RunComfy. All Rights Reserved.