ComfyUI-MiniCPM>MiniCPM-V
ComfyUI-MiniCPM
时间:2025/11/03

MiniCPM-V

MiniCPM-V节点用于加载MiniCPM V4或V4.5模型,并完成对图像或视频的分析推理任务,最终生成对应的文字描述(caption, 分析,解释等)。
MiniCPM-V-节点参数说明
输入参数
image可选参数,输入待分析的图像,支持多张图像
video可选参数,输入待分析的视频,内部通过抽帧(默认最多 64 帧)用于分析
输出参数
STRING输出经过MiniCPM模型分析后的文字结果
控件参数
model选择使用的模型,支持4种: * MiniCPM-V-4.5 V4.5 全精度版本,增强能力 * MiniCPM-V-4.5-int4 V4.5 4位量化版本,内存占用更小 * MiniCPM-V-4 V4.0 全精度版本 * MiniCPM-V-4-int4 V4.0 4位量化版本,内存占用更小
preset_prompt选择预设的prompt类型。具体种类见下文
custom_prompt自定义prompt。如果填写了就覆盖 preset_prompt
device选择运行设备,默认 Auto,会优先用 CUDA,如果不可用则回退到 CPU
memory_management模型内存管理策略: • Keep in Memory:加载后常驻内存 • Clear After Run:运行后释放内存 • Global Cache:共享缓存,多个节点可共用
seed随机数种子
使用MiniCPM-V-4.5  模型对图片进行了2次分析:

上面:描述图片细节

下面:自定义提示词,询问苹果的颜色。

可以看到MiniCPM-V-4.5连LOGO都能准确分析出来,非常优秀


关于preset_prompt预设提示词

  • "Describe": "Describe this image in detail.",
  • "Caption": "Write a concise caption for this image.",
  • "Analyze": "Analyze the main elements and scene in this image.",
  • "Identify": "What objects and subjects do you see in this image?",
  • "Explain": "Explain what's happening in this image.",
  • "List": "List the main objects visible in this image.",
  • "Scene": "Describe the scene and setting of this image.",
  • "Details": "What are the key details in this image?",
  • "Summarize": "Summarize the key content of this image in 1-2 sentences.",
  • "Emotion": "Describe the emotions or mood conveyed by this image.",
  • "Style": "Describe the artistic or visual style of this image.",
  • "Location": "Where might this image be taken? Analyze the setting or location.",
  • "Question": "What question could be asked based on this image?",
  • "Creative": "Describe this image as if writing the beginning of a short story.",
  • "Video Describe": "Describe this video in detail.",
  • "Video Analyze": "Analyze the main elements and scene in this video.",
  • "Video Identify": "What objects and subjects do you see in this video?",
  • "Video Explain": "Explain what's happening in this video.",
  • "Video List": "List the main objects visible in this video.",
  • "Video Scene": "Describe the scene and setting of this video.",
  • "Video Details": "What are the key details in this video?"




广告

可加入知识星球获取所有示例工作流

广告

微信扫码入群,加入AIGC大家庭,与大家一起交流学习