Text Encode (MOSS-Image Vision):
The TextEncodeMOSSImageVision node is designed to enhance text prompts by integrating visual elements, specifically reference images, into the text conditioning process. This node leverages the Qwen3.5-9B vision tower to extract visual embeddings from reference images and incorporate them into the text prompt, allowing for a more nuanced and contextually rich conditioning. Unlike traditional methods that rely on Variational Autoencoders (VAEs) or latent representations, this approach directly embeds the image into the prompt, ensuring that the visual context is preserved and utilized effectively. This method is particularly beneficial for AI artists looking to create more visually informed text prompts, as it allows for the seamless integration of visual and textual elements, enhancing the overall creative output.
Text Encode (MOSS-Image Vision) Input Parameters:
clip
The clip parameter is a required input that specifies the CLIP model to be used for encoding. It should be loaded with the CLIPLoader using the type 'moss_image', which corresponds to the Qwen3.5-9B text encoder. This model is responsible for processing both the text and visual inputs to generate the final conditioning.
prompt
The prompt parameter is a required string input that represents the main text prompt to be encoded. It supports multiline and dynamic prompts, allowing for complex and detailed text inputs that can be enriched with visual context.
negative_prompt
The negative_prompt is an optional string input used for negative conditioning. It supports multiline and dynamic prompts and defaults to an empty string. This parameter is useful for specifying aspects of the prompt that should be minimized or avoided in the final output.
image
The image parameter is an optional input that accepts a reference image or a batch of images. These images are embedded into the prompt through the vision tower, without using a VAE or altering the images. This allows the visual context to be directly integrated into the text conditioning process.
image_weight
The image_weight is an optional float parameter that determines the influence of the reference image on the final output. It ranges from 0.0 to 2.0, with a default value of 1.0. A value less than 1.0 reduces the image's influence by fading it towards gray, while a value greater than 1.0 increases its influence by pushing it away from gray.
vision_megapixels
The vision_megapixels parameter is an optional float input that sets the maximum resolution for each reference image before processing by the Qwen3.5 vision encoder. It ranges from 0.1 to 8.0 megapixels, with a default of 1.0. Images larger than this cap are downscaled, while smaller images retain their native resolution.
system_prompt
The system_prompt is an optional string input that allows for the inclusion of a system instruction at the beginning of the prompt. It supports multiline input and defaults to an empty string. This parameter can be used to provide additional context or instructions that guide the overall conditioning process.
print_prompt
The print_prompt is an optional boolean parameter that, when set to True, prints the fully assembled prompt sent to the Qwen3.5 text encoder. This can be useful for debugging or understanding how the text and visual elements are combined in the final prompt.
Text Encode (MOSS-Image Vision) Output Parameters:
positive
The positive output is a conditioning result that represents the encoded version of the positive prompt, which includes both the text and any visual embeddings from the reference images. This output is used to guide the generation process towards the desired outcome specified by the prompt.
negative
The negative output is a conditioning result that represents the encoded version of the negative prompt. It is used to counterbalance the positive conditioning, helping to steer the generation process away from undesired elements specified in the negative prompt.
Text Encode (MOSS-Image Vision) Usage Tips:
- To maximize the impact of the reference image, adjust the
image_weightparameter to a value greater than 1.0, which will enhance the visual influence on the text prompt. - Use the
vision_megapixelsparameter to control the resolution of the reference images, ensuring that they are appropriately scaled for optimal processing by the vision encoder. - Utilize the
system_promptto provide additional context or instructions that can guide the conditioning process, especially when working with complex or nuanced prompts.
Text Encode (MOSS-Image Vision) Common Errors and Solutions:
MOSS-Image: the Qwen3.5-9B text encoder is loaded in FP8
- Explanation: This error occurs when the Qwen3.5-9B text encoder is loaded in FP8 format, which is incompatible with the vision path.
- Solution: Load the Qwen3.5-9B text encoder using a compatible format such as bf16, fp16, or int8 via the
CLIPLoaderwith the type'moss_image'when using image references.
add_stub not implemented for Float8_e4m3fn
- Explanation: This error indicates that the vision path cannot be executed because the encoder is in an unsupported format.
- Solution: Ensure that the text encoder is loaded in a supported format (bf16, fp16, or int8) to enable the vision path functionality.
