Text Encode MiniMax Music 3 [Smart Model Loader]:
This node prepares a song description and lyrics for ComfyUI’s native MiniMax Music 3 text encoder. It checks that the song information follows the required structure, then passes it to the native encoder to create conditioning for a music-generation workflow. This helps you catch formatting problems before generation and keep the description of the music separate from the words to be sung. The node performs text encoding; it does not generate or save audio by itself.
Text Encode MiniMax Music 3 [Smart Model Loader] Input Parameters:
clip
A required CLIP connection supplying the text-encoding component used by the native MiniMax Music 3 encoder. Connect a compatible component from your model-loading workflow; this node does not load one for you. An incompatible connection may prevent encoding. There is no numeric range or default value.
song_json
A required, multiline STRING containing exactly two JSON fields, caption and lyrics, both with string values. The caption must be nonempty and contain the headings Global Metadata:, Vocal Details:, and Arrangement: in that order, with the first heading at the very start of the caption. Use the caption to describe the intended music and the lyrics field for the words to be sung; an empty lyrics string is accepted by this node’s validator. You may enter plain JSON or wrap the entire JSON object in one json or unlabelled code fence. Dynamic prompts are disabled. There is no preset text, minimum length, or maximum length in the supplied schema. For example: {"caption":"Global Metadata: Gentle acoustic song\nVocal Details: Soft solo vocal\nArrangement: Guitar and light percussion","lyrics":"A new day begins"}.
seed
A required INT that the node passes to the native encoder to control its seed-dependent behavior. Keep the same value when you want to repeat a configuration, or change it to explore a variation; the node itself does not guarantee identical final audio. The default is 0, the minimum is 0, and the maximum is 18446744073709551615. The widget also has control_after_generate enabled, so check its displayed value when comparing runs.
max_duration
A required FLOAT specifying the maximum requested song duration in seconds. It is an upper limit, not a promise that the resulting song will last that long: the model can end earlier. The default is 120.0 seconds, the minimum is 0.04, and the maximum is 360.0, with a widget step of 0.04. Set a shorter limit for a brief piece or a longer one when your workflow calls for an extended song.
cfg_scale
An advanced FLOAT setting passed to the native encoder as its guidance scale. It affects how the native encoding and downstream generation use the supplied text; changing it may alter the result, but this wrapper does not establish a universally best value or guarantee a particular sound. The default is 1.5, the minimum is 0.0, and the maximum is 100.0, with a widget step of 0.1 and rounding to 0.01. Start at the default and adjust one setting at a time when comparing results.
top_k
An advanced INT setting passed to the native encoder to control its top-k selection behavior. It can influence variation, although the audible effect depends on the connected model and the rest of your workflow. The default is 50, the minimum is 1, and the maximum is 16384. Leave it at the default for an initial run, then compare changes while keeping your description and other settings fixed.
Text Encode MiniMax Music 3 [Smart Model Loader] Output Parameters:
CONDITIONING
The CONDITIONING output is the text conditioning returned by ComfyUI’s native MiniMax Music 3 encoder after it receives the validated caption and lyrics along with the selected settings. Connect it to the compatible downstream music-generation workflow. It represents prepared guidance for generation, not a playable audio file.
seconds
The seconds output is a FLOAT value returned by the native encoder alongside the conditioning. It is a duration value in seconds for downstream workflow use. Do not interpret it as the measured length of a finished audio file: this node does not generate audio, and the model may end a song before the requested maximum duration.
Text Encode MiniMax Music 3 [Smart Model Loader] Usage Tips:
- Build the
song_jsonvalue as one JSON object with onlycaptionandlyrics. PutGlobal Metadata:,Vocal Details:, andArrangement:at the starts of their respective caption lines, in that order; do not place introductory text before the first heading. - Use valid JSON escapes inside strings. For line breaks within a caption or lyrics value, enter
\nrather than an unescaped literal line break inside the JSON string. - Start with
seedat0,cfg_scaleat1.5, andtop_kat50. When exploring variations, change one setting at a time so you can tell what affected the result. - Set
max_durationto the longest duration you need, while allowing for an earlier ending. For short experiments, a smaller limit communicates the intended ceiling without implying an exact finished length. - Connect a compatible
CLIPcomponent and use a ComfyUI installation that includesMiniMaxMusic3TextEncode. The supplied source does not specify a fixed GPU or hardware requirement, so check the requirements of the model and ComfyUI installation you actually use.
Text Encode MiniMax Music 3 [Smart Model Loader] Common Errors and Solutions:
MiniMax Music 3 requires a JSON string.
- Explanation: The value supplied to
song_jsonis not text. - Solution: Supply a text string containing the JSON object, either directly in the multiline widget or through a compatible string connection.
MiniMax Music 3 requires valid JSON with caption and lyrics strings.
- Explanation: The JSON cannot be parsed. Common causes include missing quotation marks, trailing commas, unescaped quotation marks, or an incorrectly formatted code fence.
- Solution: Check the JSON syntax and make sure both fields are quoted strings. Use plain JSON, or enclose the entire object in a single
jsonor unlabelled code fence.
MiniMax Music 3 JSON must not contain duplicate fields.
- Explanation: A field name appears more than once in the JSON object, making its intended value ambiguous.
- Solution: Keep exactly one
captionfield and onelyricsfield.
MiniMax Music 3 requires exactly caption and lyrics fields.
- Explanation: The JSON is not an object containing exactly those two field names. One may be missing, spelled differently, or accompanied by an extra field.
- Solution: Use an object shaped like
{"caption":"Global Metadata: ...\nVocal Details: ...\nArrangement: ...","lyrics":"..."}and remove any other fields.
MiniMax Music 3 caption and lyrics must both be strings.
- Explanation: At least one field contains a value such as a number, list, object, or
nullinstead of text. - Solution: Put quotation marks around each field’s text value. An empty
lyricsstring is valid for this node’s JSON check.
MiniMax Music 3 caption must not be empty.
- Explanation: The
captioncontains no text beyond whitespace. - Solution: Add a caption describing the intended music and include the required headings.
MiniMax Music 3 caption requires ordered headings: Global Metadata:, Vocal Details:, Arrangement:.
- Explanation: The caption does not begin with
Global Metadata:followed byVocal Details:and thenArrangement:, with each heading at the beginning of a line. - Solution: Put the three headings in that exact order and spelling. Remove any blank line or introductory text before
Global Metadata:.
MiniMax Music 3 encoding requires ComfyUI with MiniMaxMusic3TextEncode support. Update ComfyUI.
- Explanation: The node could not import ComfyUI’s native MiniMax Music 3 encoder, so it cannot complete encoding.
- Solution: Update ComfyUI to a version that provides
MiniMaxMusic3TextEncode, then restart it and try again. Updating this wrapper alone does not supply the missing native encoder.
