ComfyUI > Nodes > ComfyUI Layer Style > LayerUtility: PromptTagger

ComfyUI Node: LayerUtility: PromptTagger

Class Name

LayerUtility: PromptTagger

Category
😺dzNodes/LayerUtility/Prompt
Author
chflame163 (Account age: 445days)
Extension
ComfyUI Layer Style
Latest Updated
2024-06-24
Github Stars
0.64K

How to Install ComfyUI Layer Style

Install this extension via the ComfyUI Manager by searching for ComfyUI Layer Style
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Layer Style 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LayerUtility: PromptTagger Description

Enhance AI-generated images by refining text prompts with advanced AI models for precise image generation control.

LayerUtility: PromptTagger:

The LayerUtility: PromptTagger node is designed to enhance your AI-generated images by refining and optimizing the text prompts used in the generation process. This node leverages advanced AI models to process and modify your input prompts, ensuring they are well-suited for generating high-quality images. By allowing you to exclude specific words and replace them with alternatives, the PromptTagger helps you fine-tune the language of your prompts, making them more precise and effective. This node is particularly useful for AI artists who want to achieve specific visual outcomes by controlling the textual input that guides the image generation process.

LayerUtility: PromptTagger Input Parameters:

image

This parameter accepts an image input that serves as the basis for generating the text prompt. The image is analyzed to extract relevant features and context, which are then used to create a more accurate and descriptive prompt.

api

This parameter specifies the API to be used for generating the content. Currently, the only available option is gemini-pro-vision. This API is responsible for processing the image and generating the initial text prompt based on the image's content.

token_limit

This integer parameter sets the maximum number of tokens (words or word pieces) that the generated prompt can contain. The default value is 80, with a minimum of 2 and a maximum of 1024. Adjusting this limit allows you to control the length and detail of the generated prompt, with higher values producing more detailed descriptions.

exclude_word

This string parameter allows you to specify a word that you want to exclude from the generated prompt. If this word appears in the initial prompt, it will be removed or replaced, depending on the value of the replace_with_word parameter. This is useful for avoiding unwanted terms in your prompts.

replace_with_word

This string parameter specifies the word that will replace the exclude_word in the generated prompt. If exclude_word is provided, this parameter allows you to substitute it with a more suitable term, helping to refine the language of the prompt for better image generation results.

LayerUtility: PromptTagger Output Parameters:

text

The output parameter text is a string that contains the refined and optimized text prompt generated by the node. This prompt is tailored to guide the image generation process effectively, incorporating any specified exclusions and replacements to ensure it meets your specific requirements.

LayerUtility: PromptTagger Usage Tips:

  • To achieve more precise image generation results, carefully choose the exclude_word and replace_with_word parameters to refine the language of your prompts.
  • Experiment with different token_limit values to find the optimal balance between prompt detail and conciseness for your specific use case.
  • Use high-quality images as input to ensure the generated prompts are based on clear and relevant visual features.

LayerUtility: PromptTagger Common Errors and Solutions:

"Invalid API specified"

  • Explanation: The api parameter value is not recognized or supported.
  • Solution: Ensure that the api parameter is set to gemini-pro-vision, as this is the currently supported option.

"Token limit out of range"

  • Explanation: The token_limit parameter value is outside the allowed range.
  • Solution: Adjust the token_limit value to be within the range of 2 to 1024.

"Exclude word not found"

  • Explanation: The specified exclude_word does not appear in the generated prompt.
  • Solution: Verify that the exclude_word is relevant to the content of the image and the initial prompt. If necessary, choose a different word to exclude.

"API key missing or invalid"

  • Explanation: The API key required for accessing the gemini-pro-vision API is missing or invalid.
  • Solution: Ensure that you have a valid API key configured for the gemini-pro-vision API. Check your API key settings and update them if necessary.

LayerUtility: PromptTagger Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Layer Style
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.