ComfyUI > Nodes > ComfyUI_MiniCPM-V-4_5 > MiniCPM VQA

ComfyUI Node: MiniCPM VQA

Class Name

MiniCPM_VQA

Category
Comfyui_MiniCPM-V-4_5
Author
IuvenisSapiens (Account age: 1056days)
Extension
ComfyUI_MiniCPM-V-4_5
Latest Updated
2025-08-29
Github Stars
0.26K

How to Install ComfyUI_MiniCPM-V-4_5

Install this extension via the ComfyUI Manager by searching for ComfyUI_MiniCPM-V-4_5
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_MiniCPM-V-4_5 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

MiniCPM VQA Description

MiniCPM_VQA node enables VQA by processing images/videos to generate contextually relevant answers.

MiniCPM VQA:

The MiniCPM_VQA node is designed to facilitate visual question answering (VQA) tasks by leveraging advanced language models. It is capable of processing both images and videos to generate contextually relevant responses to user queries. This node is particularly beneficial for applications that require understanding and interpreting visual content in conjunction with textual input. By utilizing sophisticated natural language processing techniques, MiniCPM_VQA can provide insightful answers, making it a valuable tool for enhancing interactive AI experiences. Its ability to handle various media types and generate coherent responses underscores its importance in the realm of AI-driven content analysis and interaction.

MiniCPM VQA Input Parameters:

text

This parameter represents the textual input or query that you want the model to respond to. It can be a question or any text that requires a response based on the visual content provided. The default value is an empty string, and it supports multiline input, allowing for complex queries.

model

This parameter allows you to select the model variant to be used for processing. The options are MiniCPM-V-4_5-int4 and MiniCPM-V-4_5, with the default being MiniCPM-V-4_5-int4. Choosing a different model can impact the performance and accuracy of the responses, with each variant offering different trade-offs in terms of speed and precision.

keep_model_loaded

A boolean parameter that determines whether the model should remain loaded in memory after execution. The default value is False. Keeping the model loaded can improve performance for consecutive queries but may consume more memory resources.

top_p

This parameter controls the nucleus sampling strategy, which affects the diversity of the generated responses. It is a float value with a default of 0.8, where lower values result in more focused outputs, and higher values increase diversity. The range is from 0 to 1.

top_k

An integer parameter that specifies the number of highest probability vocabulary tokens to keep for top-k filtering. The default value is 100. A higher value allows for more diverse responses, while a lower value restricts the output to more probable tokens.

temperature

This float parameter influences the randomness of the model's output. A default value of 0.7 is set, with a range from 0 to 1. Lower values make the output more deterministic, while higher values introduce more variability and creativity in the responses.

repetition_penalty

A float parameter with a default value of 1.05, which penalizes the model for repeating the same phrases or words. This helps in generating more varied and interesting responses by discouraging repetitive patterns.

max_new_tokens

This integer parameter defines the maximum number of new tokens to be generated in the response. The default is 2048, allowing for detailed and comprehensive answers. Adjusting this value can control the length of the output.

video_max_num_frames

An integer parameter that sets the maximum number of frames to be processed from a video input. The default is 64, but this can be reduced if memory constraints are an issue, especially when using high-resolution videos.

video_max_slice_nums

This parameter, with a default value of 2, determines the maximum number of slices a video can be divided into for processing. Reducing this number can help manage memory usage, particularly in environments with limited GPU resources.

seed

An integer parameter used to set the random seed for reproducibility of results. The default value is -1, which means no specific seed is set. Setting a seed ensures that the same input will produce the same output across different runs.

MiniCPM VQA Output Parameters:

result

The output of the MiniCPM_VQA node is a tuple containing the generated response. This response is a text string that answers the input query based on the visual and textual context provided. The result is designed to be coherent and contextually relevant, offering insights or answers to the posed questions.

MiniCPM VQA Usage Tips:

  • To optimize performance, consider keeping the model loaded if you plan to make multiple queries in a session, as this reduces loading times.
  • Adjust the top_p and temperature parameters to balance between creativity and coherence in the responses, depending on the nature of your queries.
  • If you encounter memory issues, try reducing the video_max_num_frames or video_max_slice_nums to manage resource usage effectively.

MiniCPM VQA Common Errors and Solutions:

"Either image or video must be provided"

  • Explanation: This error occurs when neither an image nor a video is supplied as input, which is necessary for the node to function.
  • Solution: Ensure that you provide either a source image or a source video along with your text query to enable the node to generate a response.

"CUDA out of memory"

  • Explanation: This error indicates that the GPU does not have enough memory to process the current input size or model configuration.
  • Solution: Try reducing the video_max_num_frames or video_max_slice_nums parameters, or consider using a smaller model variant if available. Additionally, ensure that other processes are not consuming excessive GPU resources.

MiniCPM VQA Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_MiniCPM-V-4_5
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.