Qwen-Image 2.1 Prompt Enhancer (MTP):
The TextGenerateQwen35MTP node is designed to enhance text generation capabilities specifically for Qwen3.5 image prompts by utilizing MTP (Multi-Task Prompting) speculative decoding. This node is part of the Qwen-Image 2.1 Prompt Enhancer suite, which includes official presets to optimize the generation of text prompts for image creation. The primary goal of this node is to provide a sophisticated text generation mechanism that can handle complex prompts and deliver high-quality, contextually relevant text outputs. By leveraging MTP speculative decoding, the node can efficiently manage multiple tasks and generate text that is not only coherent but also enriched with enhanced details, making it particularly useful for AI artists looking to create intricate and compelling image prompts.
Qwen-Image 2.1 Prompt Enhancer (MTP) Input Parameters:
prompt
The prompt parameter is the initial text input that you provide to the node. It serves as the foundation for the text generation process. The quality and specificity of the prompt can significantly influence the generated text, as it guides the node in understanding the context and desired outcome. There are no strict minimum or maximum values for this parameter, but a well-crafted prompt can lead to more accurate and relevant text outputs.
mtp
The mtp parameter determines whether Multi-Task Prompting is enabled. It can be set to "off", "auto", or a specific integer value. When set to "off", MTP is disabled; "auto" allows the node to decide the best use of MTP based on the context; and an integer value specifies the level of MTP to apply. This parameter impacts the complexity and depth of the generated text, with higher values potentially leading to more nuanced outputs.
sampling_mode
The sampling_mode parameter is a dictionary that controls various aspects of the text generation process, including do_sample, temperature, top_k, top_p, min_p, seed, repetition_penalty, and presence_penalty. Each sub-parameter fine-tunes the generation process: do_sample toggles sampling on or off, temperature adjusts the randomness of the output, top_k and top_p control the diversity of the generated text, min_p sets a threshold for probability, seed ensures reproducibility, and repetition_penalty and presence_penalty help manage the novelty and relevance of the text. These settings allow for precise control over the text generation, enabling you to tailor the output to specific needs.
Qwen-Image 2.1 Prompt Enhancer (MTP) Output Parameters:
generated_text
The generated_text parameter is the primary output of the node, containing the text generated based on the input prompt and parameters. This text is crafted to be contextually relevant and enriched with details that align with the input specifications. The quality of the generated text can vary depending on the input parameters, but it is generally designed to be coherent and suitable for use in creating image prompts or other creative applications.
Qwen-Image 2.1 Prompt Enhancer (MTP) Usage Tips:
- Experiment with different
promptinputs to see how they affect the generated text. A more detailed prompt can lead to richer outputs. - Adjust the
mtpparameter to find the right balance between complexity and coherence in the generated text. Using "auto" can be a good starting point for most tasks. - Fine-tune the
sampling_modesettings to achieve the desired level of creativity and randomness in the text. Lowertemperaturevalues can produce more deterministic outputs, while higher values increase variability.
Qwen-Image 2.1 Prompt Enhancer (MTP) Common Errors and Solutions:
"Invalid MTP value"
- Explanation: This error occurs when the
mtpparameter is set to an invalid value that is neither "off", "auto", nor a valid integer. - Solution: Ensure that the
mtpparameter is set to one of the accepted values: "off", "auto", or a valid integer.
"Prompt too short"
- Explanation: The provided
promptis too short to generate meaningful text. - Solution: Provide a more detailed prompt to give the node enough context for generating text.
"Sampling mode configuration error"
- Explanation: There is an issue with the configuration of the
sampling_modeparameter, such as missing or incorrect sub-parameters. - Solution: Double-check the
sampling_modedictionary to ensure all necessary sub-parameters are correctly set and valid.
