Qwen Image 2.1 Edit — Phrase Weights:
The QwenImage21ConditioningPhraseEncoder is a sophisticated node designed to enhance image editing capabilities by leveraging the Qwen Image 2.1 model's native encoding. This node allows you to apply conditioning-scoped syntax using phrases and weights, which effectively adjust the attention given to specific text keys in relation to target images. By doing so, it enables nuanced control over image modifications, such as altering colors or features, with precision. The node preserves reference-image encoding, text embeddings, and native prefix caching, ensuring that the original context and details are maintained while applying the desired edits. This makes it an invaluable tool for AI artists looking to fine-tune their image outputs with specific textual prompts.
Qwen Image 2.1 Edit — Phrase Weights Input Parameters:
clip
The clip parameter refers to the CLIP model used for encoding the text and image data. It is essential for mapping the textual prompts to the visual features of the image. This parameter does not have a specific range of values as it is a model object.
prompt
The prompt parameter is the main textual input that describes the desired changes or features to be emphasized in the image. It supports a (phrase:weight) syntax, where the weight adjusts the attention given to the phrase. A weight of 1 is neutral, while values greater than 1 increase emphasis, and values less than 1 decrease it.
negative_prompt
The negative_prompt parameter is used to specify features or changes that should be minimized or avoided in the image. Like the prompt, it supports the (phrase:weight) syntax to control the degree of attention reduction.
vae
The vae parameter is optional and refers to the Variational Autoencoder model that can be used to decode the latent representations into images. If not provided, a default VAE may be used.
resolution
The resolution parameter determines the output image resolution, with a default value of 1024. It affects the level of detail and clarity in the resulting image, with higher resolutions providing more detail.
images
The images parameter is an optional input that allows you to provide reference images. These images can be used to guide the encoding process, ensuring that the output aligns with specific visual characteristics.
Qwen Image 2.1 Edit — Phrase Weights Output Parameters:
positive
The positive output represents the encoded result of the positive prompt, reflecting the features and changes that were emphasized in the image based on the input prompt.
negative
The negative output captures the encoded result of the negative prompt, indicating the features and changes that were minimized or avoided in the image.
latent
The latent output is the latent representation of the image, which can be further processed or decoded into a visual output using a VAE.
phrase_report
The phrase_report output provides a detailed JSON report of the conditioning process, including information about the attention scores, weights, and any biases applied during encoding.
Qwen Image 2.1 Edit — Phrase Weights Usage Tips:
- Use the (phrase:weight) syntax in prompts to precisely control the emphasis on specific features. For example,
(dark green:1.2)will slightly enhance the presence of dark green in the image. - Experiment with different weights to achieve the desired level of emphasis or de-emphasis on certain features, keeping in mind that a weight of 1 is neutral.
Qwen Image 2.1 Edit — Phrase Weights Common Errors and Solutions:
"Phrase weighting requires Qwen Image 2.1's native 4096-wide conditioning."
- Explanation: This error occurs when the input tensor does not match the expected dimensions for Qwen Image 2.1's conditioning.
- Solution: Ensure that the input tensor is correctly formatted with the required dimensions, specifically a 4096-wide conditioning.
"The encoded text rows or reference-image slots differ from the mapped Qwen Image 2.1 layout."
- Explanation: This error indicates a mismatch between the encoded text or image slots and the expected layout for Qwen Image 2.1. - Solution: Verify that the text and image inputs are correctly aligned with the expected layout and that any reference images are properly indexed.
"Connect Qwen Image 2.1's qwen3vl_8b CLIP, loaded with type qwen_image."
- Explanation: This error suggests that the required CLIP model is not properly connected or loaded.
- Solution: Ensure that the qwen3vl_8b CLIP model is correctly loaded and connected with the type
qwen_image.
