Visit ComfyUI Online for ready-to-use ComfyUI environment
Assists AI artists in generating negative prompts to refine AI model outputs.
The ⛔ Generate Negative Prompt node is designed to assist AI artists in generating negative prompts for their creative projects. This node leverages a pre-trained GPT-2 model to produce text that can be used to guide AI models away from certain concepts or styles, effectively helping to refine and control the output of generative models. By providing an initial input prompt, the node generates a corresponding negative prompt that can be used to suppress unwanted elements in the generated content. This is particularly useful for fine-tuning the behavior of AI models in creative applications, ensuring that the output aligns more closely with the artist's vision by avoiding specific words or phrases.
The input_prompt
parameter is a string that serves as the initial text input for generating the negative prompt. This is the starting point from which the model will generate text that aims to counteract or negate the concepts presented in the input. This parameter is required and must be provided by the user.
The max_length
parameter specifies the maximum length of the generated negative prompt. It determines how many tokens the model will generate beyond the length of the input prompt. The value must be an integer between 1 and 1024, with a default value of 100. Adjusting this parameter allows you to control the verbosity of the generated text.
The num_beams
parameter controls the number of beams used in beam search, a technique for generating text. Higher values can improve the quality of the generated text by exploring more potential sequences, but they also increase computational complexity. The value must be an integer between 1 and 10, with a default value of 1.
The temperature
parameter affects the randomness of the generated text. Lower values make the output more deterministic, while higher values increase diversity. The value must be a float between 0.1 and 2.0, with a default value of 1.0. Adjusting this parameter can help balance creativity and coherence in the generated text.
The top_k
parameter limits the sampling pool to the top k
tokens, reducing the likelihood of less probable tokens being selected. This can help in generating more focused and relevant text. The value must be an integer between 0 and 100, with a default value of 50.
The top_p
parameter, also known as nucleus sampling, restricts the sampling pool to a subset of tokens whose cumulative probability is at least p
. This helps in generating more coherent and contextually appropriate text. The value must be a float between 0.0 and 1.0, with a default value of 0.92.
The blocked_words
parameter is a multiline string where you can list words or phrases that should be removed from the generated negative prompt. Each word or phrase should be on a new line. This helps in refining the output by excluding unwanted terms, ensuring the generated text aligns more closely with your requirements.
The negative_prompt
output parameter is a string that contains the generated negative prompt. This text is designed to counteract or negate the concepts presented in the input prompt, helping to guide the AI model away from certain styles or elements. The generated negative prompt can be used in various creative applications to refine and control the output of generative models.
temperature
values to find the right balance between creativity and coherence in the generated negative prompt.blocked_words
parameter to exclude specific terms that you do not want to appear in the negative prompt, ensuring the output aligns with your creative vision.num_beams
parameter to explore more potential sequences and improve the quality of the generated text, especially for complex prompts.class_type
property correctly defined.{class_type}
does not exist.NODE_CLASS_MAPPINGS
.© Copyright 2024 RunComfy. All Rights Reserved.