ComfyUI > Nodes > Dream Project Animation Nodes > 🗫 Finalize Prompt

ComfyUI Node: 🗫 Finalize Prompt

Class Name

Finalize Prompt [Dream]

Category
✨ Dream/☯ conditioning
Author
Dream Project (Account age: 669days)
Extension
Dream Project Animation Nodes
Latest Updated
2024-07-01
Github Stars
0.07K

How to Install Dream Project Animation Nodes

Install this extension via the ComfyUI Manager by searching for Dream Project Animation Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Dream Project Animation Nodes 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

🗫 Finalize Prompt Description

Transforms partially constructed prompts for AI art generation by refining, balancing, and optimizing components.

Finalize Prompt [Dream]:

The Finalize Prompt [Dream] node is designed to transform a partially constructed prompt into a finalized format suitable for AI art generation. This node takes a partially built prompt and applies various adjustments to ensure the prompt is well-formed and optimized for the AI model. The primary goal of this node is to refine the prompt by scaling and clamping the weights of different prompt components, ensuring that the final prompt is balanced and within specified constraints. This process helps in achieving more controlled and predictable outputs from the AI model, enhancing the overall quality and coherence of the generated art.

Finalize Prompt [Dream] Input Parameters:

partial_prompt

This parameter represents the partially constructed prompt that you want to finalize. It is an instance of the PartialPrompt class, which contains the text and associated weights of the prompt components. The partial_prompt is essential as it provides the base content that will be adjusted and finalized by the node.

adjustment

This parameter determines the method used to adjust the weights of the prompt components. It can take one of three values: raw, by_abs_max, or by_abs_sum. The raw option leaves the weights unchanged, while by_abs_max and by_abs_sum scale the weights based on the maximum absolute weight and the sum of absolute weights, respectively. This adjustment helps in normalizing the prompt weights to achieve a balanced final prompt.

clamp

This parameter specifies the maximum value to which the weights of the prompt components can be clamped. It is a floating-point number with a default value of 2.0, a minimum value of 0.1, and adjustable in steps of 0.1. Clamping ensures that no individual component of the prompt has an excessively high weight, which could otherwise dominate the generated output.

adjustment_reference

This parameter provides a reference value used in the scaling process when the adjustment parameter is set to by_abs_max or by_abs_sum. It is a floating-point number with a default value of 1.0 and a minimum value of 0.1. This reference value helps in determining the scaling factor applied to the prompt weights, ensuring they are adjusted relative to a consistent baseline.

Finalize Prompt [Dream] Output Parameters:

positive

This output parameter contains the finalized positive prompt components. It is a string that lists the prompt components with positive weights, formatted and clamped according to the specified parameters. This output is used as the main input for the AI model to generate the desired art.

negative

This output parameter contains the finalized negative prompt components. It is a string that lists the prompt components with negative weights, formatted and clamped according to the specified parameters. This output is used to guide the AI model in avoiding certain features or styles in the generated art.

Finalize Prompt [Dream] Usage Tips:

  • Use the adjustment parameter to normalize the weights of your prompt components, ensuring a balanced and coherent final prompt.
  • Adjust the clamp parameter to control the influence of individual prompt components, preventing any single component from dominating the output.
  • Experiment with different adjustment_reference values to find the optimal scaling factor for your specific prompt, enhancing the quality of the generated art.

Finalize Prompt [Dream] Common Errors and Solutions:

"Partial prompt is empty"

  • Explanation: This error occurs when the partial_prompt parameter is empty or not provided.
  • Solution: Ensure that you provide a valid partial_prompt with at least one component before finalizing the prompt.

"Invalid adjustment method"

  • Explanation: This error occurs when an invalid value is provided for the adjustment parameter.
  • Solution: Check the adjustment parameter and ensure it is set to one of the valid options: raw, by_abs_max, or by_abs_sum.

"Clamp value out of range"

  • Explanation: This error occurs when the clamp parameter is set to a value outside the allowed range.
  • Solution: Adjust the clamp parameter to a value within the specified range (0.1 to 2.0) to avoid this error.

🗫 Finalize Prompt Related Nodes

Go back to the extension to check out more related nodes.
Dream Project Animation Nodes
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.