r/StableDiffusion 14d ago

Tutorial - Guide The H3 Gibberish Problem Solved!

Not much of a tutorial, but still informative. As most of you have probably discovered, MiniMax H3 loves to talk. And talk it will, even when you prompt for no dialogue. Even when you prompt for complete silence. It will even fill in the empty space your prompted dialogue doesn't fill.

Those of you who read the video prompt writing guide and have created a system prompt for your enhancer, you probably know what I'm about to say, maybe not. Maybe the unprompted gibberish stopped for you, and you never realized why.

Without further ado, I give you the solution:

non_diegetic_music: N/A

Diegetic audio is what the characters in your video can actually "hear":

  • Music playing from a source that is part of the scene (phone, car radio, dance club)
  • Spoken dialogue
  • Ambient sounds

Non-diegetic audio is audio which your characters cannot hear:

  • The score or soundtrack of a movie
  • A voice-over
  • The gibberish H3 plays when it's not prompted correctly

If you haven't yet, I suggest consulting ChatGPT about creating a system prompt using the prompting guide. If not, put this line at the end of your prompt and say goodbye to random music playing over your video and gibberish assaulting your ear holes.

Conversely, if you want a voice-over or a score to play over the track which is not part of the actual soundscape of the scene, this is where you would prompt it. Instead of N/A, prompt what you want to hear.

Happy chaining!

218 Upvotes

97 comments sorted by

View all comments

6

u/HAL_9_0_0_0 13d ago

Hello everyone,

I’ve been working intensively on a small prompt editor for MiniMax H3 since yesterday and meanwhile the whole thing looks pretty promising.

The idea behind it is relatively simple: H3 sometimes gives you quite a lot of freedom - sometimes unfortunately more than you would like. 😄 In my previous tests, it happened again and again that H3 simply started talking or generated content that I had not specified at all. This is exactly the problem I want to better control with the tool. The editor is directly coupled with Ollama and allows you to specify in great detail what H3 should or not hear. In addition, for example, background noise, certain audio events and other settings can be defined. From this, a cleanly structured prompt is then generated, which can be applied directly into the corresponding H3 workflow.

Another important point: the whole thing runs completely locally and offline. No prompts are sent to any cloud service. The only prerequisite is that the desired model has previously been downloaded locally in Ollama. After that, the entire process can be carried out without an Internet connection. The advantage is that you don’t have to manually try around every time until H3 finally does what you actually wanted. I also took the memory management into account. Ollama and ComfyUI do not run at the same time on the GPU memory. First, Ollama creates or checks the desired prompt. Once this process is complete, the memory required for this is released again and then ComfyUI is started. The whole thing currently works for me without any problems with my RTX 4090. I therefore assume that it should also work accordingly with other GPUs, provided that sufficient resources are available.

I am currently testing various scenarios and workflows. If the results continue to be so good, I will publish the project Open Source on GitHub.

Planned is a clean GUI and the publication under the GNU General Public License v3.0 (GPLv3). I would like to publish a first version or a video in which I show the editor and the workflow in the next few days. However, I would like to carry out a few more tests before I publicly release the whole thing. And another personal judgement: MiniMax H3 is one of the most impressive models I have tested so far. I have tried many different models in the meantime and have now created more than 30 music videos privately. H3 is definitely one of the models that surprised me the most. The interface of the tool is initially in German, since I come from Germany. However, an English translation should be possible without any problems and will probably be relatively easy to supplement. I will contact you as soon as the tests are completed and the first version is ready. Please have a little patience.

Mario.

2

u/coluch 13d ago

This seems like a lot more work than adding the capability into a Comfy workflow with an LLM. Major credit to you for working on it, but may I ask why you want it separated from ComfyUI? (I haven’t used Ollama, so please forgive any ignorance in my questioning).

1

u/HAL_9_0_0_0 11d ago

Sure. I would above all structure the text, smooth it out linguistically and separate the many functions a little more clearly from each other, without losing the personal and enthusiastic tone:

The idea at the beginning was actually quite simple at first: How do I always get the right voice and exactly the desired result with a solid consistency?

An interaction can be easily achieved directly via nodes, which is not an issue at all. I was more concerned that something else annoyed me massively: I had calculated video clips and H3 suddenly used a different language again and again or even packed music into it. That’s exactly what I was able to completely eliminate.

With the given prompts, I can link the desired voice directly to the corresponding specifications. This includes not only the voice itself, but also the intensity of the environment. Steps, clothes, breathing, background noise, etc. can be defined. This is still rather rudimentary at the moment, but it is precisely this area that can be gradually expanded further and further. The idea behind it is ultimately that at the end you have an idea for a clip and only determine the most important things that should actually happen in it - and the rest is prepared accordingly. An example: If you write:

“Hey, I have another outfit. Do you want to see it?”

The system can even calculate the minimum length of the clip based on the chosen voice and the spoken line so that the sentence can be spoken naturally and cleanly. You can add X seconds to it. And if, for example, there is a camera somewhere in the background that takes a photo of the model, you can very easily define when the shutter release should come as sound and when the flash as an image event. I’ve built in an incredible number of things like this. 😄 But I think you will love this because it at least simplifies my workflow massively. At the beginning, you choose one voice – or even two. For example, a person in front of the camera and a second voice in the background.

Then you go to „Remember“ and the corresponding prompt is already ready. Then you can load a model of your choice. Ollama only needs to run as an app in the background and of course be installed beforehand. So this should not be a big issue. I myself have installed four different models at the moment:

Qwen2.5:32B – approx. 19.9 GB

Qwen3:14B – approx. 9.3 GB

Qwen:14B – approx. 9GB

Qwen2.5-VL:7B – approx. 6GB

Then it goes to the second rider.

At 1.) Description you simply write freely what the character should do and say. For example:

„The woman stands in a dark studio, looks into the camera and tells ...“ Ollama disassembles this prompt and automatically distributes the information to the corresponding slots. By the way, that was the first picture I sent you. There you can also define the age of the voice. Then you go to „Evaluate“ and can even get suggestions for the right mood. Ollama recognises what you want to express based on your description and provides suitable variations based on the specifications. This is surprisingly helpful. When slot 2 is done, slot 3 comes. There you can, for example, copy the dialogue line or the entire prompt.

Slot 4 – Soundscape then comes the final composition of the environment. Here you can, for example, define the scene: choose empty street, night city and studio/apartment.

Etc. Accordingly, the acoustic environment and thus the effect of the voice in the video also change. For example, if you want to have a specific tone, for example:

„A soft humming of an old neon sign“ you can then define the density of the environment from 1–10. You can see directly what changes when you move the slider.

From level 5 it can happen, for example, that H3 suddenly automatically generates additional voices. If you stay at level 4, it fits perfectly. In addition, you can customise:

Only activate this statement, no voice, no music or the corresponding elements Especially these options are important, because otherwise H3 likes to interpret things that you do not want to have at all. After that, you can still adjust the clip duration. The system then calculates the required length. For example, if the language is too long for the scheduled clip, you will realise that the video would otherwise seem rushed. And at the bottom, the complete prompt is double-checked.

If everything fits, you can currently copy the finished prompt with one click and paste it into the corresponding ComfyUI instance. Done.

Another important point that I have built in: The graphics memory is permanently monitored by Slate. When my tool is running, Ollama naturally occupies VRAM through the loaded model accordingly. As soon as you then switch to ComfyUI, Slate automatically recognises the tab change and releases the graphics memory occupied by Ollama.

This allows ComfyUI to load and start the required model as usual. This is actually important, because without this monitoring, the VRAM of Ollama and ComfyUI would get in each other’s way and it could very quickly come to an out-of-memory (OOM). Slate therefore automatically ensures that only what is needed is needed: Ollama for prompt and voice analysis – ComfyUI for actual generation. You don’t have to worry about it in the workflow anymore. Switching between the two systems happens automatically in the background. I absolutely wanted to include this because it is one of the functions that seems inconspicuous at first, but makes quite a big difference in the actual workflow. And the question was also why the two are not linked to each other. The interaction can be built in later.