A ComfyUI extension that integrates MiniMax AI's image-to-video, text-to-video, image-to-prompt generation capabilities, and image generation capabilities, allowing users to easily convert static images into dynamic videos with optimized prompts and generate high-quality images.
- Image to video conversion
- Text to video conversion
- Image to prompt generation
- AI image generation
- Support for multiple video generation models
- Real-time video preview
- Custom prompt optimization
- Flexible API configuration
- Clone this repository to your ComfyUI custom_nodes directory:
cd custom_nodes
git clone https://github.com/backearth1/ComfyUI-MiniMax-Video.git
- Install required dependencies:
pip install -r requirements.txt
Parameter | Description | Type | Default |
---|---|---|---|
api_key | MiniMax API Key | STRING | - |
api_url | API Base URL | ["https://api.minimax.chat/v1"] | "https://api.minimax.chat/v1" |
https://api.minimax.chat/v1 for users in China; https://api.minimaxi.chat/v1 for users in other countries
Parameter | Description | Type | Default |
---|---|---|---|
image | Input Image | IMAGE | - |
api_key | MiniMax API Key | API_KEY | - |
api_url | API Base URL | API_URL | - |
model | LLM Model | ["MiniMax-Text-01", "abab6.5s-chat"] | "MiniMax-Text-01" |
VLM_prompt | Custom VLM Prompt | STRING | Default prompt template |
temperature | Model Temperature | FLOAT | 0.1 |
Parameter | Description | Type | Default |
---|---|---|---|
client | MiniMax API Client | MINIMAX_CLIENT | - |
image | Input Image | IMAGE | - |
prompt | Generation Prompt | STRING | "" |
model | Video Model | [T2V-01-Director,I2V-01-Director,S2V-01,I2V-01-live,I2V-01,T2V-01] | "I2V-01" |
prompt_optimizer | Enable Prompt Optimization | BOOLEAN | true |
Parameter | Description | Type | Default |
---|---|---|---|
api_key | MiniMax API Key | API_KEY | - |
api_url | API Base URL | API_URL | - |
prompt | Generation Prompt | STRING | "" |
model | Image Model | ["image-xy01", "image-01"] | "image-xy01" |
aspect_ratio | Image Aspect Ratio | ["1:1", "16:9", "4:3", "3:2", "2:3", "3:4", "9:16", "21:9"] | "16:9" |
n | Number of Images to Generate | INT | 1 |
prompt_optimizer | Enable Prompt Optimization | BOOLEAN | true |
- Load an image
- Connect to MiniMax API Client
- Use Image to Video node to generate video
- Preview the result
- Connect to MiniMax API Client
- Use MiniMax Image Generator node with a descriptive prompt
- Connect the output to an image preview node or use in other workflows
- Ensure you have a valid MiniMax API key
- Video generation may take some time
- Generated videos are saved in ComfyUI's output directory
- Video files are named as "time+trace_id"
- Use clear frontal images for best results
- If you don't add any image, the node will support text to video
- If you want to add watermark, please check "Add Watermark" option in the node parameters
- If you open concurrent requests, please pay attention to the account configured with enough RPM
- The Image to Prompt node can help generate better video descriptions
- For image generation, detailed prompts yield better results
Q: Why did video generation fail? A: Check:
- API key validity
- Network connection
- Input image requirements
- Prompt appropriateness
Q: How to get the best results? A: Recommendations:
- Use clear frontal images
- Use Image to Prompt node for better descriptions
- Write clear and specific prompts
- Choose appropriate models
ComfyUI MiniMax Video 扩展集成了 MiniMax AI 的图像转视频、文本转视频、图像转提示词生成功能和图像生成功能,让用户能够轻松地将静态图像转换为动态视频,并生成高质量图像。
- 图片转视频
- 文本转视频
- 图像转提示词
- AI 图像生成
- 支持多种视频生成模型
- 实时视频预览
- 自定义提示词优化
- 灵活的 API 配置
- 克隆仓库到 ComfyUI 的 custom_nodes 目录:
cd custom_nodes
git clone https://github.com/backearth1/ComfyUI-MiniMax-Video.git
- 安装依赖:
pip install -r requirements.txt
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
api_key | MiniMax API 密钥 | STRING | - |
api_url | API 基础地址 | ["https://api.minimax.chat/v1"] | "https://api.minimax.chat/v1" |
中国用户 https://api.minimax.chat/v1 ; 其他地区用户 https://api.minimaxi.chat/v1
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
image | 输入图片 | IMAGE | - |
api_key | MiniMax API 密钥 | API_KEY | - |
api_url | API 基础地址 | API_URL | - |
model | 语言模型 | ["MiniMax-Text-01", "abab6.5s-chat"] | "MiniMax-Text-01" |
VLM_prompt | 自定义 VLM 提示词 | STRING | 默认提示词模板 |
temperature | 模型温度 | FLOAT | 0.1 |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
client | MiniMax API 客户端 | MINIMAX_CLIENT | - |
image | 输入图片 | IMAGE | - |
prompt | 生成提示词 | STRING | "" |
model | 视频模型 | [T2V-01-Director,I2V-01-Director,S2V-01,I2V-01-live,I2V-01,T2V-01] | "I2V-01" |
prompt_optimizer | 启用提示词优化 | BOOLEAN | true |
watermark | 添加水印 | BOOLEAN | false |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
api_key | MiniMax API 密钥 | API_KEY | - |
api_url | API 基础地址 | API_URL | - |
prompt | 生成提示词 | STRING | "" |
model | 图像模型 | ["image-xy01", "image-01"] | "image-xy01" |
aspect_ratio | 图像宽高比 | ["1:1", "16:9", "4:3", "3:2", "2:3", "3:4", "9:16", "21:9"] | "16:9" |
n | 生成图像数量 | INT | 1 |
prompt_optimizer | 启用提示词优化 | BOOLEAN | true |
- 加载图像
- 连接 MiniMax API 客户端
- 使用图像转视频节点生成视频
- 预览结果
- 连接 MiniMax API 客户端
- 使用 MiniMax 图像生成节点并输入描述性提示词
- 将输出连接到图像预览节点或用于其他工作流
- 确保拥有有效的 MiniMax API 密钥
- 视频生成可能需要一定时间
- 生成的视频会保存在 ComfyUI 的输出目录中
- 视频文件会以"时间+trace_id"命名
- 建议使用清晰的正面图片以获得最佳效果
- 如果未添加任何图片,节点将支持文本转视频
- 如果需要添加水印,请在节点参数中勾选"添加水印"选项
- 如果开启并发请求,请注意账号配置了足够的RPM
- 图像转提示词节点可以帮助生成更好的视频描述
- 对于图像生成,详细的提示词会产生更好的结果
Q: 为什么视频生成失败? A: 请检查:
- API 密钥是否有效
- 网络连接是否正常
- 输入图片是否符合要求
- 提示词是否合适
Q: 如何获得最佳效果? A: 建议:
- 使用清晰的正面图片
- 使用图像转提示词节点获取更好的描述
- 编写清晰具体的提示词
- 选择合适的模型
MIT License
欢迎提交 Issues 和 Pull Requests!