Prompt Relay Encode (Smart):
The PromptRelaySmartEncode node is designed to enhance the flexibility and precision of prompt-based conditioning in AI models, particularly for video content. It allows you to parse and utilize advanced syntax to define segments within a prompt, enabling more granular control over how prompts are applied across different parts of a video. This node automatically calculates segment lengths based on the provided syntax, such as inline ranges like [0-50] or block headers like Second 1:, ensuring that the prompts are distributed evenly or proportionally across the specified segments. This capability is particularly beneficial for artists and creators who wish to apply different prompts to various sections of a video, allowing for dynamic and contextually relevant conditioning that enhances the creative output.
Prompt Relay Encode (Smart) Input Parameters:
model
The model parameter is the AI model that will be conditioned using the parsed prompts. It serves as the foundation upon which the prompt relay mechanism operates, ensuring that the specified prompts are applied effectively to the model's processing.
clip
The clip parameter is an optional input that represents the video clip to which the prompts will be applied. It provides the temporal context necessary for the node to distribute the prompts across the video segments as defined by the smart syntax.
latent
The latent parameter is used to input latent variables that may influence the model's behavior. These variables can be crucial for fine-tuning the model's response to the prompts, allowing for more nuanced and tailored outputs.
global_prompt
The global_prompt is a string input that conditions the entire video. If left empty, the node will automatically use the first parsed segment from the smart_prompt as the global anchor, providing a default context for the video.
smart_prompt
The smart_prompt parameter allows you to enter prompts using a specialized syntax. This syntax can be inline, such as 'text one [0-50] | text two [50-100]', or block-based, like 'Second 1:\ntext one\nSecond 2:\ntext two'. The node parses this syntax to determine how prompts are distributed across the video segments.
normalize_by_tokens
The normalize_by_tokens is a boolean parameter that, when set to true, scales the calculated length of each segment by its token count. This ensures that segments with more complex prompts receive proportionally more attention, enhancing the precision of the conditioning.
epsilon
The epsilon parameter is a float that defines a small value used in calculations to prevent division by zero or other numerical issues. It has a default value of 1e-3, with a minimum of 1e-6 and a maximum of 0.99, adjustable in steps of 1e-4.
Prompt Relay Encode (Smart) Output Parameters:
model
The model output is the conditioned AI model that has been processed using the parsed prompts. This output reflects the modifications made by the node, ready for further use or analysis.
positive
The positive output represents the conditioning applied to the model, specifically the positive prompts that have been parsed and distributed across the video segments. This output is crucial for understanding how the prompts have influenced the model's behavior.
Prompt Relay Encode (Smart) Usage Tips:
- Utilize the
smart_promptsyntax to define precise segments within your video, allowing for targeted conditioning that enhances specific parts of the content. - Experiment with the
normalize_by_tokensoption to see how it affects the distribution of prompts, especially if your segments vary significantly in complexity or length.
Prompt Relay Encode (Smart) Common Errors and Solutions:
"Invalid syntax in smart_prompt"
- Explanation: This error occurs when the syntax used in the
smart_promptparameter does not conform to the expected format. - Solution: Review the syntax guidelines and ensure that your prompt follows the inline or block format correctly.
"Epsilon value out of range"
- Explanation: The
epsilonparameter has been set to a value outside the allowed range. - Solution: Adjust the
epsilonvalue to be within the specified range of1e-6to0.99, using increments of1e-4if necessary.
