ComfyUI-M3-IRContext
MiniMax H3 multimodal Context IR and creative direction nodes for ComfyUI
Nodes (3)
MiniMax H3 Context IR for ComfyUI — leoleexh
An independent multimodal prompt preprocessor for the native MiniMax H3 nodes in ComfyUI. It analyzes connected images, sampled video frames, and audio transcripts with an OpenAI-compatible model, builds a validated Context IR, and deterministically renders either the H3 Base three-section prompt or the Ref2VA six-section prompt.
This project is not affiliated with MiniMax and does not reproduce or claim equivalence with MiniMax's proprietary H3-Context-IR or Regenerate-2K service.
Interface localization / 界面本地化 / UIのローカライズ
The plugin follows ComfyUI's current Comfy.Locale setting and displays one
interface language at a time. English, Chinese, and Japanese are supported;
regional Chinese locales such as zh-CN and zh-TW use the Chinese interface,
and regional Japanese locales use Japanese. Other locales fall back to English.
Changing the ComfyUI language updates existing plugin nodes without changing
their stored workflow keys, connections, or backend preset values.
插件会跟随 ComfyUI 当前的 Comfy.Locale 设置,并且一次只显示一种界面语言。
支持英文、中文和日文;zh-CN、zh-TW 等中文地区设置统一使用中文,日文地区设置统一使用日文,
其他语言回退到英文。切换语言只改变节点标题、参数、提示说明和预设的显示文字,不会改变工作流字段、连线或后端预设值。
プラグインはComfyUIの Comfy.Locale に追従し、英語・中国語・日本語のいずれか一つを表示します。
言語変更はノード名、項目名、ツールチップ、プリセット表示だけに適用され、ワークフローのキー、接続、内部値は変わりません。
中文说明
它解决什么问题
原生 MiniMax H3 本地节点可以接收提示词和参考媒体,但普通文本润色节点看不到真实图片、视频帧和音频,也无法可靠保证 <Picture N>、<Video N>、<Audio N> 与下游素材顺序一致。本插件把这层工作拆成可校验流水线:
- 本地建立不可变素材注册表和视频/音轨配对;
- 图片直接分析;视频按原生 H3 的 24 fps/17k+5 时间线截取有效前缀,再以约 2 fps 均匀抽取、最多 32 帧;音频转为 16 kHz 单声道副本后转录;
- 使用 OpenAI Responses API 的严格 Structured Outputs 生成 Context 计划;不支持 Responses 的兼容渠道可选择或自动回退到 Chat Completions;
- 本地检查素材 ID、标签、主体、逐字对白、连续时间线和目标时长;失败时最多修复一次;
- 本地确定性渲染 H3 Base 三段格式或 Ref2VA 六段格式。
节点
在 leoleexh/MiniMax H3 分类中添加三个节点:
MiniMax H3 Context IR (OpenAI) - leoleexh
MiniMax H3 Creative Director / 创意导演 - leoleexh
MiniMax H3 Official Dialogue Tokenizer - leoleexh
主要输出:
h3_prompt:直接连接原生MiniMax H3 Image to Video或MiniMax H3 Reference to Video的prompt。context_ir_json:完整 IR、受信素材注册表、媒体摘要和计划。analysis_report:模式、时长、素材和计划摘要。warnings:隐私、缓存、未使用素材和降级信息。usage_json:模型、接口类型、请求 ID、token、耗时和缓存命中;不含密钥。
重要:输入本节点的图片、视频和音频仍需按同一顺序连接到原生 H3 生成节点。本节点不替代原生媒体 conditioning。
width、height、length 是直接连接的 INT 输入口,不再由本节点单独填写。请把
官方工作流中 Resolution Selector 的宽高输出,以及 Duration 经 Math Expression
得到的 H3 对齐整数帧数,同时分线连接本节点和原生 H3:
Resolution Selector.width ─┬─> Context IR.width
└─> Native H3.width
Resolution Selector.height ─┬─> Context IR.height
└─> Native H3.height
Duration Math.integer ─┬─> Context IR.length
└─> Native H3.length
本节点用同一个 length / 24 计算提示语总时长并规划 shot 节奏,因此提示语和最终
生成不会再出现分辨率或时长漂移。例如官方时长链输出 73 帧时,提示语按约 3.042 秒
规划,原生 H3 也生成同样的 73 帧。
在 cloud 模式中,user_prompt 原文只作为分析模型的输入,并保存在
context_ir_json.original_user_prompt 供审计;本地 renderer 不再接收原始输入,因而
不会自动把 User request ... (verbatim) 回填到最终 h3_prompt。H3 只接收规范化的
创作意图、结构化硬约束、正式 <Picture/Video/Audio/Subject N> 标签、镜头时间线和
结构化对白。必要的关键词仍可能由规划模型保留,但不会再无条件重复整段原文。
local_only 没有语义规划模型,只能把去除台词正文后的原始需求作为保守制作指令;
提取出的台词只通过正式 <d> 块输出一次。
创意导演预设
创意导演节点把视频类型、导演语法、物理运镜、视觉风格、运动强度、剪辑节奏、
创意强度和参考视频用途组合成专用 M3_CREATIVE_PROFILE 数据。把它的
creative_profile 输出连接主节点同名输入即可:
MiniMax H3 Creative Director.creative_profile
│
└─> MiniMax H3 Context IR.creative_profile
它不是把预设名称追加到用户提示语,而是按主节点实际收到的宽高、帧数、模式和素材
展开成可执行摄影约束:镜头起止构图、物理路径、焦距行为、视差、稳定方式、速度与
落幅,连同时长感知的动作密度、画幅构图、视觉质感和参考视频角色一起交给 LLM。
本地 renderer 还会把同一组具体约束确定性写入 H3 提示语,因此预设不会因模型遗漏
而失效;内部下拉值和预设名称不会直接进入最终 h3_prompt。
创意优先级固定为:用户明确要求和逐字对白 → 身份、商品和首尾帧保持 → 音乐/对白/
旁白/字幕开关 → 创意导演配置 → 不确定的素材风格推断 → 模型自由发挥。发生冲突时
节点保留更高优先级约束,并在 warnings 说明调整。例如 one_take + fast 会变成
无切镜的快速连续调度;固定机位配合动态风格时,能量改由主体和环境运动承担。
主要选项:
video_type:除品牌、商品、时尚、叙事、短剧、舞蹈、纪实、动作、游戏、动画和 UI 动效外,还包括社媒短视频、开箱、食品、汽车、美妆、房产、旅行、活动、婚礼、知识讲解、访谈见证和 ASMR 细节等适合 H3 短时长生成的类型。directing_grammar:除沉静戏剧、亲密观察、动态动作、史诗揭示、精密商业、时尚编辑、纪实、黑色悬疑、梦境流动、喜剧节奏和一镜到底外,还提供宏大思辨、几何心理张力、霓虹碎片爱情、童话式对称、沉浸连续长镜、东方诗意史诗、温暖奇观和巴洛克悬疑。它们是可执行电影语法,不把具名导演写入 Prompt。camera_recipe:固定机位、物理推进、后拉揭示、横向跟拍、英雄环绕、升降揭示、手持跟随、甩镜、滑动变焦、微距移焦、俯拍下降和一镜跟随。visual_style:默认preserve_reference;除原有电影写实、商业、时尚、纪实、胶片、宽银幕、梦幻、黑色电影、霓虹、动漫、3D 和定格外,新增奢华极简、产品微距、美食、美妆、汽车、35mm、黄金/蓝调时刻、明亮通透、粗粝写实、雨夜赛博朋克、诗意武侠、韩剧浪漫、水彩和水墨。shot_density:默认auto,遵循 MiniMax H3 官方公开的 Shot 结构原则,不强制固定镜头数。也可选择single_take、low、balanced、high、montage。例如 6–12 秒目标中,high建议 4–5 个有效镜头,montage建议 5–7 个;用户明确镜头数和一镜到底要求仍有更高优先级。creative_strength:reference_first、balanced、strong。无论多强都不能覆盖用户明确要求、参考身份、必要商品或固定首尾帧。reference_video_use:限定唯一参考视频只贡献动作、运镜、节奏、视觉风格,或作为完整参考。
云端模式会校验生成方案是否落在所选镜头范围内,并在偏离时自动修复一次。local_only 不具备语义分镜能力,仍输出单镜头结构,并在所选范围不包含 1 时给出明确警告。
不连接创意导演节点时,主节点保持 v0.1 的原有行为和提示语结构。profile_json 和
profile_summary 输出可用于检查、保存和复现设置。
对接 VideoHelperSuite
VHS Load Video (Upload) 的“图像”输出是一个 [帧数, 高, 宽, 通道] 的 ComfyUI
IMAGE 批次,正好可以连接本节点的 ref_video_1。请把同一个“图像”输出分成两路:
- 一路连接本节点的
ref_video_1,供 AI 抽帧理解; - 另一路连接原生
MiniMax H3 Reference to Video的ref_video_1,供 H3 真正生成。
VHS 建议设置 force_rate=24、select_every_nth=1,因为 IMAGE 批次本身不携带
帧率元数据,本节点和原生 H3 都按 24 fps 解释它。frame_load_cap 最好与下游
H3 的统一 length 整数一致;设为 0 也能工作,但多加载的后半段不会参与当前目标长度的
H3 生成或 AI 分析。不要连接 meta_batch 做分块流式载入,本节点不会跨多次执行
自动拼接分块。若需要分析视频原声,把 VHS 的 audio 同时连接到本节点的
ref_video_audio_1 和原生 H3 对应音轨输入;frame_count、video_info 无需连接。
安装
克隆到 ComfyUI 的 custom_nodes,然后必须使用启动 ComfyUI 的同一个 Python 安装依赖:
git clone https://github.com/leoleelxh/ComfyUI-M3-IRContext.git ComfyUI/custom_nodes/ComfyUI-M3-IRContext
python -m pip install -r ComfyUI/custom_nodes/ComfyUI-M3-IRContext/requirements.txt
密钥与兼容渠道
节点直接提供 api_key (visible; saved in workflow)、base_url、模型和 api_mode
输入项。节点内填写的密钥优先;留空时再读取环境变量。当前 ComfyUI 标准字符串
控件会显示该值,并可能把值写进 workflow JSON,因此不要分享含真实密钥的工作流
或截图。
如果工作流需要分享,建议把节点的 API Key 留空,在启动 ComfyUI 前设置:
$env:H3_CONTEXT_API_KEY = "你的密钥"
$env:H3_CONTEXT_BASE_URL = "https://api.openai.com/v1" # 可选默认值
也支持 OPENAI_API_KEY。完整优先级为:节点 API Key →
H3_CONTEXT_API_KEY → OPENAI_API_KEY。不要把真实密钥写入 README、.env、
要分享的工作流、截图或 Git 仓库。私有 GitHub 仓库也不能保护单独导出的工作流文件。
节点内可设置:
api_key:直接填写渠道密钥;字段内容可见,并可能随工作流保存。base_url:任意 OpenAI 兼容入口;会写进工作流,因此只能填写 URL,不能拼接密钥。model_preset:质量优先默认gpt-5.6-sol,另有gpt-5.6-terra、gpt-5.6-luna、gpt-5.5。custom_model:选择custom后填写兼容渠道的模型 ID。api_mode:auto优先 Responses;端点明确不支持时回退 Chat Completions。也可强制指定。
并非所有“OpenAI 兼容”渠道都支持图片、严格 JSON Schema 或音频转录;缺少必需能力时节点会明确失败,不会伪造分析。
多素材适配与生成开关
节点保留原生 H3 的多图能力,但有意把视频简化为单段:最多 9 张参考图、1 段
参考视频、1 条该视频的配套音轨,以及 3 条独立参考音频。参考图按端口顺序成为
<Picture 1..9>;唯一的视频是 <Video 1>;ref_video_audio_1 若存在则成为
与 <Video 1> 固定配对的 <Audio N>。这样由多图定义外观、由单视频定义动作
和运镜,避免多段视频之间的主体、动作或镜头意图互相冲突。
每张图片和每段视频由 AI 分别分析,然后统一合成一个 Context 计划,不会把全部
图片一次塞进同一个请求。max_visual_inputs(默认 40)限制一次节点执行向 AI
发送的视觉输入总量:每张静态图占 1 个名额,剩余额度用于沿唯一参考视频中原生
H3 实际采用的时间线前缀,以约 2 fps 均匀抽帧;max_video_frames 默认及硬上限为
32。实际帧数取“约 2 fps、剩余总额度、32 帧”三者中的最小值。
最终 Context 合成请求只接收文字摘要,不再接收图片。完整视频帧序列仍需按同样
顺序连接到原生 H3 节点,由 H3 本身完成 reference conditioning。
所有发给视觉模型的静态图和视频抽帧都会在本地生成 JPEG 分析副本:保持宽高比, 最长边不超过 1024px,并通过自适应质量和必要时的进一步缩放,把每张编码后的 JPEG 严格压到 100,000 bytes 以下。原始图片和交给原生 H3 的完整视频帧不会被 修改。Base64/JSON 传输本身仍会带来约三分之一的协议体积开销。
generate_background_music:默认开。开时要求生成适合画面的非画内配乐,但用户明确要求无音乐时仍尊重用户;关时最终提示语强制禁止背景音乐。generate_dialogue:默认开。dialogue_language=auto时仍只在角色和叙事确实需要时生成自然对白;选择具体语言后,云端规划必须至少生成一条该语言对白。关时禁止对白和演唱。若关闭后提示词仍包含可识别的自然对白或<d>台词,节点会报出明确冲突。dialogue_language:默认auto;可选择 H3 官方列出的 11 种稳定对白语言:Arabic、Chinese、English、French、German、Italian、Japanese、Korean、Portuguese、Russian、Spanish。它只控制视频中说出口的语言,不改变 H3 提示语正文或节点界面语言。用户可以直接写“她说:你好。中文对白”,插件会逐字提取台词并自动生成 H3 标签;显式<d>[Language] 台词</d>也继续兼容。generate_narration:默认关。关时禁止旁白、画外音、口述画面和朗读提示语;开时也只有用户原始需求明确要求旁白时才允许,任何情况下都不允许朗读段落标题、素材标签或提示语说明。generate_subtitles:默认关。关时明确禁止对白字幕;开时只为实际对白请求同步烧录字幕,并要求匹配对白原文和语言。若同时关闭对白,则不会生成字幕。
字幕属于视频模型直接生成的画面文字,拼写和字形不一定稳定;要求逐字准确时,建议生成无字幕视频后再用外部字幕节点合成。
H3 官方对白格式为:人物身份与声线 (S1) says <d>[Chinese] 中文台词。</d>。说话人身份、声线、语气和动作放在 <d> 外,标签内只放语言与真正说出口的文字;同一说话人跨镜头复用同一个 (S1)。最终 h3_prompt 必须连接到原生 MiniMax H3 conditioning 节点,并使用当前 H3 专用文本编码器/tokenizer;普通或旧版 Qwen tokenizer 不能视为等价替代。
把新增 Tokenizer 节点插在文本编码器加载器和原生 H3 conditioning 节点之间:
H3 Text Encoder Loader.CLIP
└─> Official Dialogue Tokenizer.clip
└─> patched_clip ─> Native MiniMax H3.clip
它只给正确的 H3 tokenizer 补入官方 token 并核对 ID:<d>=151669、</d>=151670。如果当前 ComfyUI/loader 已经包含这些 token,节点返回 already_ready,不会重复添加;如果接入普通 Qwen/CLIP 或 token ID 不一致,则直接报错,不会静默生成错误 conditioning。
本插件在 ComfyUI 的 Python 进程内传递 Unicode,并使用 ensure_ascii=False 和 UTF-8 缓存,不通过 PowerShell 提交生成任务。只有在外部 PowerShell 脚本调用 ComfyUI API 时,才需要额外确认脚本文件、标准输入和 JSON 请求体采用 UTF-8 或 Unicode 转义,避免中文变成 ????。
模式与编号
- 无媒体:T2VA
- 仅首帧:I2VA
- 仅尾帧:L2VA
- 首尾帧:FL2VA
- 任意
ref_*:Ref2VA
首尾帧和 Ref2VA 素材不能混用。Ref2VA 编号严格复现原生 H3:全部参考图片;随后每段视频(若有同编号配套音轨,音轨标签先于视频标签);最后独立音频。Picture、Video、Audio 各自从 1 编号。连接 ref_video_audio_N 时必须同时连接 ref_video_N。
隐私与缓存
cloud:用户文字、压缩图片、视频采样帧、以及转录所需的 16 kHz 音频副本会发送到你配置的 API 入口。local_only:不创建网络 Provider,不上传文字或媒体;仅输出保守模板,不能声称理解了媒体内容。- 缓存默认位于
~/.cache/comfyui-h3-context-ir,只保存派生摘要和 IR,不保存原始媒体或密钥。IR 仍可能包含敏感提示词,可关闭cache_enabled。 - 可用
H3_CONTEXT_CACHE_DIR、H3_CONTEXT_CACHE_TTL_SECONDS和H3_CONTEXT_CACHE_MAX_MB调整
开发验证
python -m pytest -q
在线质量评测必须由用户自行提供 API 密钥和本地 H3 模型;仓库测试绝不内置或读取开发者密钥。评测用例见 tests/golden/cases.json 和 docs/evaluation.md。
已知限制
- 通用视觉 API 接收的是视频抽帧,不是原始视频;短暂快速动作可能遗漏。
- 音频转录可能出错;画面分析不会假装听到声音。
- OpenAI 兼容渠道能力不统一,音频转录入口尤其可能缺失。
- 量化 H3 Base 与官方闭源 Regenerate-2K 仍决定最终质量上限。
- 取消为阶段间和网络请求轮询式协作取消;远端服务可能已经收到已发出的请求。
English
What it does
The node establishes a trusted local media registry, analyzes images and timestamped video samples, transcribes audio, asks an OpenAI-compatible model for a strict JSON plan, validates it locally, optionally repairs it once, and renders the final H3 prompt locally. The model never controls physical input numbering.
Wiring
Connect h3_prompt to the native H3 node's prompt input. Connect every image,
video frame sequence, and audio object to both this preprocessor and the native
H3 node in the same order. This preprocessor does not produce conditioning and
does not forward media.
For dialogue, insert MiniMax H3 Official Dialogue Tokenizer - leoleexh
between the H3 text-encoder loader and the native H3 conditioning node. It adds
the official <d>/</d> IDs 151669/151670, verifies the complete H3 audio
special-token set, and is idempotent when a future loader is already correct.
Generic Qwen/CLIP inputs or mismatched IDs fail explicitly.
width, height, and length are direct INT sockets. Branch the official
Resolution Selector width/height outputs to both this preprocessor and native
H3. Branch the H3-aligned integer output from the Duration Math Expression to
both length inputs. The preprocessor plans its complete shot timeline from
that exact length / 24, so prompt pacing and native generation share one
authoritative resolution and duration source.
In cloud mode, the raw user_prompt is sent only to the planning model and
retained as context_ir_json.original_user_prompt for audit. The local renderer
no longer receives it, so it cannot automatically append a verbatim user-request
line to h3_prompt. Native H3 receives normalized intent, structured constraints,
trusted H3 tags, shot timing, and structured dialogue. local_only has no
semantic planner and therefore uses the request with spoken words removed as
its conservative production instruction; extracted speech is emitted once in
the native <d> block.
For VideoHelperSuite, branch the IMAGE output from VHS Load Video (Upload)
to both ref_video_1 ports. Set force_rate=24 and select_every_nth=1;
prefer setting frame_load_cap to the same aligned integer sent to both
length inputs. IMAGE
batches do not carry FPS metadata. Do not use meta_batch streaming because
this preprocessor does not aggregate chunks across executions. Branch VHS
audio to both paired soundtrack inputs when soundtrack analysis is wanted;
frame_count and video_info are not required.
Auto mode resolves to T2VA, I2VA, L2VA, FL2VA, or Ref2VA from the connected
ports. Base keyframes and ref_* inputs are mutually exclusive. A
ref_video_audio_N input is accepted only with ref_video_N.
Creative Director presets
The separate MiniMax H3 Creative Director / 创意导演 - leoleexh node emits a
typed M3_CREATIVE_PROFILE. Connect its creative_profile output to the
optional input with the same name on the Context IR node. The profile combines
production format, directing grammar, a physical camera recipe, visual
treatment, motion intensity, edit rhythm, shot density, creative strength, and
the intended role of the single reference video.
shot_density=auto is the default because MiniMax's published H3 guides define
shot structure and cut semantics but do not prescribe a fixed shot count for a
given duration. Auto therefore uses the fewest purposeful shots, requires every
cut to introduce new information, prefers camera motion for small framing
changes, and preserves FL2VA's official single-shot preference. Explicit
single_take, low, balanced, high, and montage choices request
duration-aware ranges; for a 6–12 second target, high requests 4–5 shots and
montage requests 5–7. Explicit user counts and one-take direction take
priority.
Cloud mode validates the authored plan against the selected range and performs
one repair pass when it misses. local_only cannot semantically author distinct
shots, so it keeps its deterministic single-shot structure and emits a warning
when the selected range excludes one.
Preset names are never appended to the user prompt. The main node resolves the
profile against the exact duration, aspect ratio, generation mode, and connected
media, then sends concrete trusted camera/composition/pacing/look directives to
the planning model. The deterministic renderer writes the same expanded
directives into the H3 prompt so they cannot silently disappear when the model
under-applies a preference. Internal preset keys do not appear in h3_prompt.
Priority is: explicit user requirements and verbatim dialogue; identity,
product, and fixed endpoint retention; generation controls; creative direction;
uncertain media aesthetics; optional model embellishment. Compatibility rules
reconcile conflicts and report them through warnings. With no creative profile
connected, existing v0.1 behavior is preserved.
The curated library adds short-form social, unboxing, food, automotive, beauty, real-estate, travel, event, wedding, educational, interview/testimonial, and ASMR production types. It also adds technical directing grammars for monumental speculation, geometric psychological tension, fragmented neon romance, storybook symmetry, immersive continuity, poetic Eastern scale, warm wonder, and baroque suspense, plus focused commercial, time-of-day, regional, and illustrative looks. These are concrete production systems rather than named director imitation. Conflict rules protect interview eye line and lip sync, ASMR contact timing, people-first framing, fixed endpoints, and target aspect ratio. Existing stored option values remain valid.
Installation
Clone this repository into ComfyUI/custom_nodes, then install
requirements.txt with the exact Python interpreter that starts ComfyUI:
python -m pip install -r ComfyUI/custom_nodes/ComfyUI-M3-IRContext/requirements.txt
Restart ComfyUI and find the node under leoleexh/MiniMax H3.
Credentials and compatible endpoints
The node directly exposes API key, base URL, model, and API mode controls. A
node-entered key takes priority, followed by H3_CONTEXT_API_KEY and then
OPENAI_API_KEY from the ComfyUI process environment. ComfyUI's standard
string widget shows the value and may serialize it into workflow JSON. Leave
it blank and use an environment variable for workflows that will be shared.
auto uses Responses first and falls back to Chat Completions only when the
endpoint lacks Responses support.
An endpoint must support visual input and strict JSON Schema output for cloud media planning. Audio transcription also requires an OpenAI-compatible transcription endpoint. Missing capabilities produce an explicit error rather than fabricated Context IR.
Multiple references and generation controls
The node keeps native H3's multi-image capability but intentionally simplifies
video input to one reference: up to 9 reference images, 1 reference video, 1
paired video soundtrack, and 3 standalone audio references. Images become
<Picture 1..9>, the video becomes <Video 1>, and audio receives independent
<Audio N> numbering in native presentation order. Images define appearance;
the single video defines action, timing, and camera intent without conflicts
between multiple motion references.
Each asset is analyzed separately and then synthesized into one trusted plan.
max_visual_inputs (default 40) caps total still images plus sampled video
frames for one node execution. Still images consume one slot each; remaining
slots are sampled uniformly at about 2 fps from the H3-aligned timeline prefix
that native generation actually uses. max_video_frames defaults to and is
hard-capped at 32. The final synthesis call receives text summaries,
not images. Connect every complete media input to the native H3 node in the
same order.
Every still image and sampled video frame is encoded locally as a JPEG analysis derivative with its aspect ratio preserved, maximum side at most 1024px, and encoded size strictly below 100,000 bytes. Originals and the full frame batch sent to native H3 are unchanged. Base64/JSON transport still adds roughly one third of protocol overhead.
generate_background_music and generate_dialogue default to on;
dialogue_language defaults to auto; choosing Arabic, Chinese, English,
French, German, Italian, Japanese, Korean, Portuguese, Russian, or Spanish
requires cloud planning to author at least one spoken line in that language.
Users do not need to write H3 tags. Common natural forms such as
她说:你好,我们终于见面了。中文对白 are parsed locally, kept verbatim,
and rendered into the native format automatically. Explicit
<d>[Language] ...</d> content remains supported and takes priority.
generate_narration and generate_subtitles default to off. These controls are included in AI
planning, Context IR/cache identity, and the final prompt. Music off is enforced
locally, dialogue without actual planned lines produces no speech, narration
off prohibits voice-over and audible prompt reading, and subtitles on asks
for exact synchronized captions only when dialogue exists. Generated in-frame
text may be imperfect, so external subtitle compositing remains preferable for
exact typography.
Native H3 dialogue is rendered as (S1) says <d>[Chinese] 中文台词。</d>.
Speaker identity, voice, delivery, and action remain outside <d>; only the
language tag and spoken words are inside. Connect the result to the current
native MiniMax H3 conditioning node and H3-specific text encoder/tokenizer.
This plugin passes Unicode inside Python and UTF-8 JSON/cache paths; PowerShell
encoding is relevant only to external scripts that submit their own API
Testing
python -m pytest -q
Live API and H3 A/B evaluation is intentionally separate because it requires
the user's own credentials, models, and generation time. See
docs/evaluation.md.
Comfy Registry publishing
Confirm or create publisher leoleexh, review the version in
pyproject.toml, and run comfy node publish from the repository root. Enter
the Registry key only at the prompt and never commit it. A manual-only Actions
example is available at
docs/github-actions/publish-comfy-registry.yml.example; copy it into
.github/workflows/ only after the GitHub credential has workflow scope, and
store the key as repository secret REGISTRY_ACCESS_TOKEN. The Registry
package ID is m3-ircontext-leoleexh; the Git repository may retain its
user-requested ComfyUI-prefixed name.
References
- ComfyUI custom-node walkthrough
- Comfy Registry publishing
- Comfy Registry standards
- MiniMax H3 model card
- MiniMax H3 Base prompt guide
- MiniMax H3 Ref prompt guide
- OpenAI vision guide
- OpenAI Structured Outputs
License
MIT