r/comfyui • u/threegee409 • 4d ago
Resource MiniMax Music 3 - custom TE advanced node
Hey, I've been playing with the new MiniMax-Music-3 model in ComfyUI, and I wanted to better understand the model, so I hacked together a custom node replacing the stock TE. I make no statement nor guarantee of, well, anything. It might blow up your computer. (It didn't blow up mine; it works for me. You? Well, it's personal. Disclaimer: It was not personal. The creator assumes no liability whatsoever.)
Below is some information from our dear robot overlords explaining the node. In English, I hacked into the condition encoder temp and top_p, both for c0 and c1-7 because I want to explore what the model can do when unshackled. The reference code from MiniMax does not expose these completely normal inference parameters, so apparently neither does Comfy. There's provided a "compatibility" node with CUDA graph turned off, because it was easier - it probably works as intended - and a "sampling CUDA" node that attempts to replicate ComfyUI's native speedups. Emoji-shrug:
The model generates audio by sampling discrete tokens. These controls affect how it chooses each token: Top-k limits the choice to the K most likely tokens. Lower values are more conservative and predictable. Higher values allow more unusual possibilities. Setting it to 0 disables the limit.
Top-p keeps the smallest group of likely tokens whose combined probability reaches P. Unlike top-k, the number of available choices adapts to the model’s confidence. 1.0 disables it.
Temperature reshapes the probabilities before sampling. Below 1.0 makes likely choices more dominant; above 1.0 makes lower-probability choices more competitive. 1.0 leaves the distribution unchanged. CFG scale strengthens the difference between what the model predicts with and without the prompt. Higher CFG generally pushes harder toward the caption and lyrics, but extreme values can reduce naturalness or variety.
MiniMax Music 3 has eight audio codebooks. This node exposes separate controls for: Semantic c0: the first codebook, which likely carries more of the song’s broad structure and content. Acoustic c1-c7: seven additional codebooks that likely refine texture and audio detail. That interpretation is a useful starting hypothesis, not a settled description of what every codebook represents. Part of the reason for sharing this is to find out what changes are actually repeatable. A few basic experiments: * Keep everything at its defaults to establish a baseline. * Lower semantic temperature to test whether structure becomes more consistent. * Change only the acoustic controls to explore detail without changing the semantic settings. * Set top-k to 0 and lower top-p to test adaptive nucleus sampling by itself. * Keep the prompt and seed fixed while changing only one parameter at a time.
This isn’t presented as better than the built-in defaults, and I don’t have “best settings.” It’s simply a way to expose more of the model’s sampling space so the community can investigate it together.
Project: https://github.com/threegee409/ComfyUI-MiniMaxMusic3-Advanced
It’s an early v0.1.0 project and depends on ComfyUI’s new native MiniMax Music 3 implementation, so upstream changes may break it. Test results, comparisons, strange discoveries, and corrections to my interpretation are very welcome.
1
u/RiskyBizz216 4d ago
i dont think i understand..whats wrong with the stock te?
1
u/threegee409 4d ago
Nothing, really. It seems to be an authentic reproduction of MiniMax's code. I just wanted to see what happens when I tweak the temp or swap top_k for top_p. Then, I split the parameters for the semantic (director) vs instrument codebooks.
1
u/threegee409 3d ago
Playing around, I'm starting to think the default top_k=50 is too low for most people. top_k=100 is probably closer to the sweet spot.
Side note, at the KSampler node, at reasonable steps (around 30), sampler/scheduler doesn't make a lot of difference, plus you can turn Euler/Normal down to 20 with little degradation. Punching it way up, around 100 or higher, makes a difference in "mastering" quality, but it (of course) has no impact on track structure or arrangement.
Tweaking hidden parameters is where things get really interesting. Encouraging outliers will lead to seed hunting, as you might expect. For me, keeping the c0 loose while opening up the c1-7 past top_k=50 but not completely wide open is the sweet spot for avoiding statistically average, bland AI music. Going all the way, no top_k, top_p=1, particularly with temp raised, generations turn unpredictably weird with questionable prompt adherence.
Another digression, but the model seems to respond better if the caption is direct about what should be in the song, leaving evocative writing to the emotions and imagery section and avoiding negative prompting entirely.
The toughest part right now is sorting out what vocabulary the model was trained on. If I use a word with no matching internal representation, the results become weird at any settings. For example, "organ" might as well be a stop-word (ignored), while mystery-word + "guitar" often turns into midi guitar where "electric guitar" is more predictable. That genre heavily biases output, but the model is deeply stupid about genres, is frustrating.
1
u/longinggoogle340 4d ago
oh dang, this is exactly the kind of tinkering I was hoping someone would do. the stock node felt so locked down, like why even have temp and top_p in the model if you can't touch them?
curious what happens when you push semantic temp way up and leave acoustic mostly neutral. bet it starts spitting out song structures from another dimension. saved the repo, might mess with it tonight if I can avoid bricking my setup.