Visit ComfyUI Online for ready-to-use ComfyUI environment
Versatile node for processing text and images, integrating text encoding and image preprocessing functions efficiently.
The QwenProcessorWrapper is a versatile node designed to process both text and images, leveraging the capabilities of the QwenVLTextEncoderLoaderWrapper. This node is integral for tasks that require the transformation of textual and visual data into a format suitable for further processing or analysis. It handles a variety of functions such as text tokenization, image preprocessing including resizing and normalization, and the insertion of vision tokens. Additionally, it can label images with "Picture X:" and format templates, making it a powerful tool for creating structured data inputs for AI models. The QwenProcessorWrapper is particularly beneficial for users looking to seamlessly integrate text and image data processing in their workflows, ensuring that the data is prepared in a consistent and efficient manner.
The processor parameter is a required input that specifies the processor to be used for handling the text and image data. It must be of type QWEN_PROCESSOR, which ensures that the node can perform its intended functions effectively. This parameter is crucial as it dictates the processing capabilities available to the node.
The text parameter is a required input that allows you to provide the textual data to be processed. It is of type STRING and supports multiline input, with a default value of "A beautiful landscape". This parameter is essential for tasks that involve text-to-image generation or any operation where text needs to be transformed or analyzed.
The images parameter is an optional input that accepts image data for processing. It is of type IMAGE and is used when the task involves image editing or when images need to be preprocessed alongside text. This parameter is important for workflows that require the integration of visual data.
The mode parameter is an optional input that determines the operation mode of the node. It can be set to either "text_to_image" or "image_edit", with a default value of "text_to_image". This parameter influences how the node processes the input data, allowing you to tailor the processing to specific tasks.
The add_picture_labels parameter is an optional boolean input that, when enabled, adds "Picture X:" labels to multiple images. It has a default value of True and provides a tooltip explaining its function. This parameter is useful for organizing and labeling images in a structured manner, especially when dealing with multiple images.
The system_prompt parameter is an optional input that allows you to provide a system prompt for template formatting. It is of type STRING, supports multiline input, and has a default value of an empty string. This parameter is beneficial for customizing the processing template according to specific requirements.
The return_tensors parameter is an optional input that specifies the format of the returned tensors. It can be set to either "pt" (PyTorch) or "np" (NumPy), with a default value of "pt". This parameter is important for ensuring compatibility with the desired framework or further processing steps.
The processed output is of type QWEN_PROCESSED and represents the processed data resulting from the node's operations. This output is crucial as it provides the transformed text and image data, ready for subsequent use in AI models or other processing nodes.
The formatted_text output is of type STRING and contains the text that has been formatted according to the node's processing logic. This output is important for understanding how the input text has been transformed and for verifying the correctness of the processing.
processor parameter is correctly set to a valid QWEN_PROCESSOR to avoid processing errors and to utilize the full capabilities of the node.mode parameter to switch between text-to-image and image-editing tasks, optimizing the node's performance for your specific needs.add_picture_labels parameter to maintain clarity and organization in your output.processor parameter is not set or is invalid, preventing the node from executing its processing functions.QWEN_PROCESSOR is connected to the node. Verify that the processor is correctly loaded and available for use.<error_message>Qwen2_5_VLProcessor, verify its availability and consider using AutoProcessor as a fallback.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.