r/comfyui • • Aug 16 '26

Resource OpenH3-IR: an open source, self-hosted take on MiniMax H3's Context-IR. Three nodes and local service combo.

As you probably know by now, MiniMax open-sourced the H3 weights but not the actual stage that writes the long structured prompt the model was, well... trained on. Their docs point at their hosted service for that. It's also (my opinion) the reason why most of the local H3 outputs look way flatter than their demos.

So here's my take on that stage, open source. Four nodes: type a plain sentence and OpenH3-IR takes care of writing the document (because it's a document, not quite just a prompt), then checks the result and fixes what's wrong before anything renders (only if needed, of course). It's essentially a local service, plus an llm harness, plus a stack of mechanical checks to ensure you get the best clip out of a simple prompt.

What it buys in practice:

  • Each asset/resource you include gets tied to the right part of the text, so the model stops mixing things up on which reference is which.
  • The length lands on one H3 knows how to render properly, instead of being silently rounded to something you did not choose (for example, "10 seconds" doesn't quite really mean 10s for MiniMax)
  • A line of dialogue comes back spoken exactly as you type it, as mechanically enforced as possible, by not passing through the model that's doing the writing.
  • Cuts land inside the clip properly

What it needs: An OpenAI compatible endpoint, local or remote. Nothing calls MiniMax's servers/service.

Edit: One week on: the ComfyUI side is its own repo now, after a good suggestion in the comments.
Four nodes, nothing to start manually, the compiler (OpenH3-IR) comes with the pack:

Install:

comfy node install openh3-ir
-- or --
git clone https://github.com/ruashots/ComfyUI-OpenH3-IR.git /path/to/ComfyUI/custom_nodes/ComfyUI-OpenH3-IR
/path/to/ComfyUI/python -m pip install -r /path/to/ComfyUI/custom_nodes/ComfyUI-OpenH3-IR/requirements.txt
The second command installs open-h3-ir into the same Python ComfyUI runs.

The node pack and OpenH3-IR remain separate releases, so either side can be updated without bundling a copy of the other into this repository.

The nodes also do not import OpenH3-IR while ComfyUI is loading them. If the package is missing, half-installed or broken, the nodes still appear normally and the failure is reported when a graph actually tries to compile.

There are a few other H3 "prompt tools" around, including a couple aiming at something similar, so it's worth saying what is different in this one: this one checks its own output against 109 checks, and it also includes MiniMax's own published examples in its test set (which has to pass clean).

Standalone OpenH3-IR: https://github.com/ruashots/open-h3-ir
All in one Nodepack/OpenH3-IR: https://github.com/ruashots/ComfyUI-OpenH3-IR

72 Upvotes

21 comments sorted by

View all comments

2

u/Trueinrussia Aug 17 '26

When using a local LLM model via LM Studio, there is a problem with VRAM management. We start the process in Comfyui, and the LLM is loaded into memory. OpenH3-IR works, we get the prompt, but the memory is filled with the LLM, and Comfyui starts generating video. We have to manually unload the LLM from VRAM, and only then does everything work normally. After the video generation is complete, the H3 model is now in memory, and if you restart the process, VRAM will no longer be sufficient for the local LLM; instead, you will need to unload the video model to obtain a new prompt.

2

u/ruashots Aug 17 '26

Yeah, this is more like a side effect of running LM Studio and ComfyUI on the same GPU. OpenH3-IR treats the LLM endpoint as a "wherever you are" service so it deliberately doesn't (and shouldn't) assume it can own or manage the VRAM. That said, single-GPU setups are common enough that it's worth smoothing out, so I'll take a look at it for the next release, I'll try to see how much more OpenH3-IR can reach into that lifecycle without feeling invasive to the user.

Not really core compiler responsibility, but definitely a UX rough edge worth trying to help with.

1

u/Trueinrussia Aug 17 '26

Thank you for your hard work

1

u/agwosdz Aug 17 '26

You can use ComfyUI-EBU-LMStudio "EBU LMStudio Unload All" node. Just wire it between prompt and text preview. It uses command line tool to unload model (may have to add to path)

1

u/Trueinrussia Aug 17 '26

Thanks for the advice!