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

MiniCPM-V (Advanced)

MiniCPM-V (Advanced)节点是MiniCPM-V的增强,基本作用与MiniCPM-V一致用于分析图像或视频,不同的是参数更多,适合对生成过程进行精细控制。
MiniCPM-V (Advanced)-节点参数说明
输入参数
image可选参数,输入待分析的图像,支持多张图像
video可选参数,输入待分析的视频,内部通过抽帧(默认最多 64 帧)用于分析
输出参数
PROMPT输出使最终使用的提示词
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
system_prompt系统提示词,用于设定整体风格/身份(类似 ChatGPT system prompt),如 "You are a helpful assistant."
max_new_tokens生成的最大 token 数(限制输出长度,默认512)
temperature采样温度,数值越大生成越随机,越小越确定性
top_pnucleus sampling 参数,控制输出多样性(越低越保守)
top_k从概率最高的K个 token 中采样,0 表示不限制
repetition_penalty重复惩罚系数,防止生成内容过度重复
video_max_num_frames视频最大抽帧数(默认 64,最多 128)
video_max_slice_nums视频切片数(默认 2,最多 4),用来分段分析视频,减少内存消耗
device选择运行设备,默认 Auto,会优先用 CUDA,如果不可用则回退到 CPU
memory_management模型内存管理策略: • Keep in Memory:加载后常驻内存 • Clear After Run:运行后释放内存 • Global Cache:共享缓存,多个节点可共用
seed随机数种子
展示了不同的temperature对于最终结果的影响,当设置为2的时候,大模型会更加发散。

我们的问题是:苹果的颜色,

当temperature为0.5 回答非常简洁:The apple in the image is red with a slight yellowish tint.

当temperature为2 回答开始发散:The apple in the image is predominantly red, but parts of it also appear to reflect shades of orange sunlight. This combination gives it a vibrant reddish-orange hue under bright natural lighting on the tree with sunshine from its bottom right side onto all surrounding objects near like cloudy skies and apples


展示top_p参数

当top_p为0.1  The apple in the image is primarily red with some yellowish highlights, giving it a shiny appearance.

当top_p为1    The apple in the image is red with a slight yellowish tint.



展示top_k参数:


当top_k为1   The apple in the image is primarily red with some yellowish highlights, giving it a shiny appearance.

当top_k为200 The apple in the image is red with a slight yellowish tint on one side, giving it a warm gradient appearance.


广告

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

广告

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