[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94468":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},94468,"ComfyUI-MiniMax-H3-Promptor","1038lab\u002FComfyUI-MiniMax-H3-Promptor","1038lab","A powerful, ComfyUI Custom node automation suite for generating cinema-production-grade prompts explicitly formatted for the **MiniMax H3 Video Generation System**.",null,"Python",110,15,101,4,0,8,44.41,"GNU General Public License v3.0",false,"main",true,[],"2026-08-24 04:01:22","# 🎬 ComfyUI MiniMax H3-Promptor\r\n\r\nA powerful, node-based automation suite for generating cinema-production-grade prompts explicitly formatted for the **MiniMax H3 Video Generation System**.\r\n\r\nThis project provides a robust, decoupled architecture separating **multimodal visual analysis** from pure **text-based prompt structuring**, allowing for extreme customizability, precise scene description, and low API operating costs.\r\n\r\n![ComfyUI MiniMax H3-Promptor](example_workflows\u002FMiniMax-H3-Promptor.jpg)\r\n\r\n---\r\n\r\n## 🎉 What's New in [V1.1.0](updates.md#release-notes-v110) (Refined Architecture)\r\n\r\n*   **Zero-Hallucination Inline Tagging**: The Prompt LLM now natively embeds `\u003CPicture X>` references directly inside the narrative action lines, guaranteeing 100% compliance with official MiniMax tag-binding requirements.\r\n*   **Sequential Multi-Modal Processing**: Upgraded the Vision Analyzer to process inputs sequentially. This eliminates Multi-Modal LLM context bleeding and guarantees proxy API limits are never exceeded.\r\n*   **Flawless 6-Part Official Syntax Compliance**: Our structural generation has been de-patched. The Promptor now strictly assembles the mandatory 6-part string array (`subject_definitions`, `summary`, `retention`, etc.) in the exact sequence HuggingFace mandates.\r\n*   **Audio Pipeline Fix**: Completely restored routing logic for Native Audio paths (Audio-to-Video and Image-to-Audio).\r\n*   **Custom Node Theming**: Added native UI coloring support for ComfyUI (`appearance.js`).\r\n\r\n---\r\n\r\n## 🌟 The V1.0.0 Decoupled Architecture\r\n\r\nThe pipeline consists of two nodes working in tandem to handle extreme complexity without duplicating LLM vision costs:\r\n\r\n### 1. `H3_Vision_Analyzer` 👁️\r\nA highly configurable multimodal analysis engine. This node acts as your virtual Director of Photography, analyzing input imagery and video based on explicit presets.\r\n*   **Infinite Dynamic Scaling**: Upgraded to ComfyAPI v3 `io.Autogrow`. You are no longer limited to 4 images. Connect as many Images and Videos as you want seamlessly.\r\n*   **Targeted Custom Overrides**: Use the `custom_prompt_override` box to type rules like `\u003CPicture 2>: Focus entirely on the background`. It will surgically override the global mode for that exact frame!\r\n*   **Invisible Heavy VRAM Management**: Automatically detects when you are using local models like `Ollama` and safely unloads them behind the scenes to preserve VRAM for the actual H3 video generation.\r\n*   **Multilingual Output**: Choose between English and Chinese for the analysis output language.\r\n*   **Outputs**: Produces a structured JSON-backed `vision_context` that is sent to the Promptor node, completely uncoupling image arrays from the final text pipeline.\r\n\r\n#### Vision Analyzer Inputs\r\n| Parameter | Type | Description |\r\n|-----------|------|-------------|\r\n| `ref_images` | IMAGE | Connect one or multiple images; dynamically grows infinitely (`image_X`). |\r\n| `ref_videos` | IMAGE | Connect video tensor sequences; dynamically grows (`video_X`). |\r\n| `global_image_mode` | COMBO | Selects the global fallback analysis logic from `vision_prompts.json` for all images. |\r\n| `global_video_mode` | COMBO | Selects the global fallback analysis logic from `vision_prompts.json` for all videos. |\r\n| `custom_prompt_override`| STRING | A multi-line box to surgically override specific media logic. E.g: `\u003CPicture 2>: focus on the lighting`. |\r\n| `output_language` | COMBO | Language for the analysis output (`English` or `Chinese`). |\r\n| `provider` | COMBO | `openai`, `ollama`, `gemini`, or `claude`. |\r\n| `api_key` | STRING | API Key override (leaves `config.json` untouched). |\r\n| `model_name` | STRING | VLM Model override (e.g. `gpt-4o`, `gemini-2.5-flash`). |\r\n| `temperature` | FLOAT | Sampling temperature. Default `0.2` for precise factual analysis. |\r\n| `max_tokens` | INT | Maximum response tokens (256-8192). |\r\n\r\n### 2. `H3_Promptor` 📝\r\nThe core structure engine. It operates at blazing speeds because it takes the user's description and the Vision Analyzer's text report to format the final H3 Prompt—meaning **it does not need to repeatedly analyze heavy images.**\r\n*   **Intelligent Cross-Node `Auto` Detection**: Even though this node no longer connects to images directly, the `H3_Vision_Analyzer` invisibly stamps a hidden `[MEDIA_SIGNATURE]` encoded with your exact inputs. The `H3_Promptor` silently parses this signature and automatically selects the correct generation mode:\r\n\r\n| Vision Inputs | Auto-Detected Mode |\r\n|---|---|\r\n| No media connected | **T2V** — Text-to-Video |\r\n| 1 image | **I2V** — Image-to-Video |\r\n| 2 images | **FL2VA** — First & Last Frame |\r\n| 3-4 images | **Ref2VA** — Omni Reference |\r\n| Video only | **V2V** — Video-to-Video |\r\n| Any images + Video | **Ref2VA** — Omni Reference |\r\n\r\n*   **Language Selection**: Output the final cinematic prompt strictly in **Chinese (简体中文)** or **English**, seamlessly bridging international setups.\r\n*   **Duration Syncing**: Define how long your video is (4-15s), and the LLM will rigorously pace the structural shot-list to match that exact timeframe at 24FPS.\r\n\r\n#### Promptor Inputs\r\n| Parameter | Type | Description |\r\n|-----------|------|-------------|\r\n| `task_type` | COMBO | The generation mode (`Auto`, T2V, I2V, FL2VA, etc.). Auto is recommended. |\r\n| `description` | STRING | Your main creative description of the video scene. |\r\n| `duration` | INT | Desired video length (4-15 seconds). |\r\n| `vision_context` | STRING | Connect the output of `H3_Vision_Analyzer` here. Leave unconnected for pure T2V. |\r\n| `output_language` | COMBO | Output the resulting prompt in `English` or `Chinese`. |\r\n| `provider` | COMBO | `openai`, `ollama`, `gemini`, or `claude`. |\r\n| `api_key` | STRING | API Key override. |\r\n| `model_name` | STRING | Model override (e.g. `gpt-4o`, `claude-sonnet-4-20250514`). |\r\n| `temperature` | FLOAT | Sampling temperature. Default `0.7` for creative writing. |\r\n| `max_tokens` | INT | Maximum response tokens (256-8192). |\r\n\r\n---\r\n\r\n## 🔌 Supported LLM Providers\r\n\r\nAll 4 providers are implemented as **independent, native API integrations** — no wrappers, no compatibility layers. Each provider file is fully self-contained for easy maintenance.\r\n\r\n| Provider | File | API Format | Default Model | Auth Method |\r\n|---|---|---|---|---|\r\n| **OpenAI** | `provider_openai.py` | `\u002Fv1\u002Fchat\u002Fcompletions` | `gpt-4o` | `Bearer` Token |\r\n| **Ollama** | `provider_ollama.py` | Ollama `\u002Fapi\u002Fchat` | `llama3.1` | None (local) |\r\n| **Gemini** | `provider_gemini.py` | Google `generateContent` | `gemini-2.5-flash` | URL `?key=` param |\r\n| **Claude** | `provider_claude.py` | Anthropic Messages API | `claude-sonnet-4-20250514` | `x-api-key` Header |\r\n\r\n> **Local & Compatible APIs (LMStudio, llama.cpp, DeepSeek, etc.)**: \r\n> Because LMStudio, llama.cpp, vLLM, and many other providers use the standard OpenAI API format, they are fully supported out of the box! Simply select **OpenAI** as your provider and update the `\"api_base\"` URL in your `config.json` to point to your local or custom endpoint (e.g., `\"http:\u002F\u002Flocalhost:1234\u002Fv1\"` for LMStudio). You can use any dummy string for local API keys.\r\n> \r\n> *Popular compatible APIs you can use with the OpenAI setting:*\r\n> *   **DeepSeek**: Highly affordable and powerful models, very popular.\r\n> *   **Groq**: Lightning-fast inference API powered by LPU hardware.\r\n> *   **OpenRouter**: A model aggregator platform widely used by international users.\r\n> *   **Together AI \u002F SiliconFlow**: APIs providing access to various open-source models (like Llama 3).\r\n\r\n> All providers support multimodal (image) inputs for the Vision Analyzer node.\r\n\r\n---\r\n\r\n## 🌟 Workflow Recipes & Tutorials\r\n\r\nWant to learn how to do **Lip-Syncing, Character Interaction, Video Style Transfer**, or **High-End Product Commercials**?\r\n\r\n👉 **[Click here to view the Master Workflow Tutorials](tutorials.md)**\r\n👉 **[点击这里查看 8 大经典实战工作流教程 (中文版)](tutorials_zh.md)**\r\n\r\n---\r\n\r\n## 🚀 Installation & Setup\r\n\r\n1. **Clone the Repository**:\r\n   Clone this repo into your `ComfyUI\u002Fcustom_nodes` folder:\r\n   ```bash\r\n   cd ComfyUI\u002Fcustom_nodes\r\n   git clone https:\u002F\u002Fgithub.com\u002F1038lab\u002FComfyui-Minimax-H3-Promptor.git\r\n   ```\r\n2. **Install Dependencies**:\r\n   ```bash\r\n   pip install -r requirements.txt\r\n   ```\r\n3. **Configuration (`config.json`)**:\r\n   On first load, the node will auto-create a `config.json` inside its folder. Open it and fill in your API keys:\r\n   ```json\r\n   {\r\n     \"providers\": {\r\n       \"openai\":  { \"api_key\": \"sk-...\" },\r\n       \"gemini\":  { \"api_key\": \"AIza...\" },\r\n       \"claude\":  { \"api_key\": \"sk-ant-...\" }\r\n     }\r\n   }\r\n   ```\r\n   > You can also override API keys directly on each node's UI without editing config.json.\r\n\r\n---\r\n\r\n## 🎨 Modding & Customization\r\n\r\n### The `vision_prompts.json` Ecosystem\r\nUpon the first boot of V1.0.0, a `vision_prompts.json` file is generated in the root folder. You can open this JSON file to modify or add completely new analysis strategies:\r\n\r\n```json\r\n{\r\n    \"image_prompts\": {\r\n        \"Subject \u002F Identity\": \"Focus exclusively on describing the main subject's appearance...\",\r\n        \"Color Palette & Texture\": \"Focus exclusively on the dominating colors...\"\r\n    }\r\n}\r\n```\r\nAdd your own custom keys — changes take effect after a ComfyUI restart.\r\n\r\n### The System Templates\r\nWant to alter how the backend formats the `[SCENE]` blocks?\r\nOpen the `templates\u002F` directory. The `system_base.txt` controls global rules, while the other text files (e.g., `i2v.txt`) control the exact formatting structure based on the mode you selected.\r\n\r\n---\r\n\r\n##  Credits & Resources\r\n\r\n*   Developed by **[1038lab](https:\u002F\u002Fgithub.com\u002F1038lab)**.\r\n*   **MiniMax H3 Specifications**: Designed specifically to interface with the core structural requirements given by MiniMax.\r\n\r\n## License\r\n\r\nGPL-3.0\r\n","这是一个专为MiniMax H3视频生成系统设计的ComfyUI自定义节点套件，用于自动化构建符合其官方6部分语法规范的高质量影视级提示词。核心功能包括零幻觉内联图片标签（\u003CPicture X>）、顺序式多模态视觉分析（避免上下文污染）、结构化提示词生成与原生音频路径支持；技术特点为视觉分析与文本提示解耦、动态图像\u002F视频输入扩展、VRAM智能管理及中英文输出可选。适用于需批量生成合规H3提示词的AI视频工作流，尤其适合专业内容创作者、影视预演团队及需要稳定低API成本的生产环境。",2,"2026-08-09 02:30:05","CREATED_QUERY"]