Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-HyMotion > HY-Motion Prompt Rewrite

ComfyUI Node: HY-Motion Prompt Rewrite

Class Name

HYMotionPromptRewrite

Category
HY-Motion/prompt
Author
Aero-Ex (Account age: 1460days)
Extension
ComfyUI-HyMotion
Latest Updated
2026-05-27
Github Stars
0.03K

How to Install ComfyUI-HyMotion

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

Run ComfyUI Online

HY-Motion Prompt Rewrite Description

Enhances prompt engineering by rewriting and optimizing prompts for AI tasks, improving efficiency and accuracy.

HY-Motion Prompt Rewrite:

The HYMotionPromptRewrite node is designed to enhance the process of prompt engineering by rewriting input prompts and inferring the optimal duration for their execution. This node leverages advanced prompt rewriting techniques to transform and optimize textual prompts, making them more effective for AI-driven tasks. By doing so, it helps in achieving more accurate and contextually relevant outputs from AI models. The primary goal of this node is to streamline the prompt creation process, reduce manual intervention, and improve the overall efficiency of AI workflows. It is particularly beneficial for AI artists and developers who seek to refine their prompts for better performance and results.

HY-Motion Prompt Rewrite Input Parameters:

text

The text parameter is the initial input prompt that you want to rewrite. It serves as the foundation for the prompt engineering process, where the node will analyze and transform the text to enhance its effectiveness. The quality and clarity of the input text can significantly impact the outcome, as a well-structured prompt can lead to more precise and relevant rewrites.

max_new_tokens

The max_new_tokens parameter determines the maximum number of new tokens that can be generated during the prompt rewriting process. This parameter controls the extent of transformation applied to the original prompt, allowing you to balance between maintaining the original context and introducing new elements. The default value is typically set to 512, providing a substantial range for modifications while ensuring the rewritten prompt remains concise and focused.

use_rewritten_duration

The use_rewritten_duration parameter is a boolean flag that indicates whether to use the duration suggested by the prompt rewriter or to stick with a manually specified duration. This parameter allows you to choose between automated duration inference, which can optimize timing based on the rewritten prompt, and manual control, which might be preferred in scenarios where specific timing is crucial.

manual_duration

The manual_duration parameter specifies a fixed duration for the prompt execution, overriding the automatically inferred duration if use_rewritten_duration is set to false. This parameter is useful when you have predetermined timing requirements that must be adhered to, regardless of the prompt's content or complexity.

HY-Motion Prompt Rewrite Output Parameters:

rewritten_text

The rewritten_text output parameter provides the transformed version of the input prompt. This rewritten text is optimized for better performance and relevance, incorporating changes that enhance its clarity and effectiveness for AI-driven tasks. The output is designed to be more aligned with the intended goals of the prompt, facilitating improved interactions with AI models.

final_duration

The final_duration output parameter indicates the duration that should be used for executing the rewritten prompt. This value is either the duration suggested by the prompt rewriter or the manually specified duration, depending on the configuration. It ensures that the prompt execution is timed appropriately, contributing to the overall efficiency and effectiveness of the AI workflow.

original_text

The original_text output parameter returns the initial input prompt as it was before any rewriting. This allows you to compare the original and rewritten versions, providing insights into the changes made during the prompt engineering process. It serves as a reference point for evaluating the effectiveness of the transformations applied.

HY-Motion Prompt Rewrite Usage Tips:

  • Ensure that the input text is clear and concise to facilitate effective rewriting and achieve optimal results.
  • Use the max_new_tokens parameter to control the extent of changes applied to the prompt, balancing between maintaining context and introducing new elements.
  • Consider enabling use_rewritten_duration to leverage the node's ability to infer optimal execution timing based on the rewritten prompt.
  • If specific timing is crucial, set use_rewritten_duration to false and specify a manual_duration to ensure adherence to your requirements.

HY-Motion Prompt Rewrite Common Errors and Solutions:

Prompt rewriting failed: <error_message>

  • Explanation: This error occurs when the prompt rewriting process encounters an unexpected issue, possibly due to invalid input or configuration settings.
  • Solution: Verify that the input text is correctly formatted and that all parameters are set appropriately. Check for any syntax errors or unsupported characters in the prompt.

Failed to initialize PromptRewriter: <error_message>

  • Explanation: This error indicates a problem with initializing the PromptRewriter, potentially due to missing dependencies or incorrect configuration.
  • Solution: Ensure that all necessary dependencies are installed and that the configuration settings, such as model_path, are correctly specified. Check the system logs for more detailed error information.

HY-Motion Prompt Rewrite Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-HyMotion
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

HY-Motion Prompt Rewrite