Nodes/ComfyUI-AceStep_SFT/AceStep 1.5 SFT TextEncode
ComfyUI Node

AceStep 1.5 SFT TextEncode

Your 'prompt' for music is caption + lyrics + BPM + key. This node turns all of it into conditioning

By jeankassio·Created 6 months ago·Updated 4 months ago· 56
AceStep 1.5 SFT TextEncode
  • clip
  • positive
  • negative
caption
lyrics[Instrumental]
instrumentaltrue
seed0
duration60.0
bpm0
timesignatureauto
languageen
keyscaleauto
generate_audio_codestrue
lm_cfg_scale2.0
lm_temperature0.85
lm_top_p0.90
lm_top_k0
lm_min_p0.000
lm_negative_prompt
style_tags
style_bpm0
style_keyscale

In image workflows your "prompt" is one text box. In AceStep music generation it's a whole little data packet: a caption describing the song, the lyrics, and a pile of metadata - BPM, key/scale, time signature, duration, language. AceStepSFTTextEncode is the node that takes all of that in and produces the positive and negative conditioning the Generate node actually samples with. If you want different music, this is where the magic happens.

What happens inside

AceStep 1.5 conditions on far more than raw text. The node runs your caption and lyrics through the Qwen text encoders, then - when generate_audio_codes is on (default) - the bigger Qwen LLM writes semantic audio codes, a structured token stream that tells the diffusion model the overall shape of the piece before sampling starts. That's a big part of why AceStep tracks like it does instead of collapsing into a wash of noise.

Two behaviors are worth knowing before you fight them:

  • Auto-duration. Set duration to 0 and the node estimates the song length by parsing the lyrics - verse/chorus sections, [Intro]/[Outro]/[Instrumental] markers, line counts - at your BPM. It's genuinely useful, but it means long dense lyrics produce long songs.
  • Metadata is structured. BPM, key/scale, time signature and duration get encoded as structured metadata (YAML-style) for the LLM, and as direct metadata for the caption encoder. bpm: 0, keyscale: auto, timesignature: auto all mean "let the model decide."

The inputs that actually matter

  • caption - the musical description. The community tutorial for AceStep 1.5 suggests writing along dimensions: style/genre, mood, instruments, timbre/texture, era reference, production style, vocal characteristics, speed/rhythm, structure hints. "Upbeat electronic dance music with synthesizers" works; a tangle of contradictory tags works less well.
  • lyrics + instrumental - the lyrics box (with [Verse 1]-style section markers, [Instrumental] for instrumentals). Flip instrumental on and it force-overrides the lyrics box with [Instrumental] regardless.
  • bpm, keyscale, timesignature, language - the musical metadata. 23 languages are in the dropdown. Keep everything on auto until you know what you want.
  • style_tags, style_bpm, style_keyscale - these three optional inputs are the reason this node pairs so well with the pack's Get Music Infos analyzer. Wire the analyzer's outputs in here and you can clone the style of an existing track.

The lm_* group (lm_cfg_scale, lm_temperature, lm_top_p, lm_top_k, lm_min_p, lm_negative_prompt) controls the LLM's audio-code sampling. Defaults are sane - tune lm_temperature if you want more variety in the structural codes, leave the rest alone.

Outputs

positive and negative, both CONDITIONING. Straight into the Generate node's matching inputs. Nothing else.

Common gotchas

  • The negative side is thin. The lm_negative_prompt box feeds LLM CFG; the base negative conditioning is largely what the model defaults to. Don't expect SD-style negative prompting muscle here.
  • Instrumental that isn't. If you write lyrics but forget to flip instrumental, you get vocals you didn't want (or weird mangled ones). It's the most common "why is there singing" report.
  • Captions that fight themselves. The model is trained on licensed-clean music and reads captions literally; contradictory dense tags dilute each other. Simplify.

It's the same install as the rest of the pack - Manager search "AceStep", or clone https://github.com/jeankassio/ComfyUI-AceStep_SFT into custom_nodes/. Its clip input takes the clip output from the Model Loader (or the last Lora Loader in a chain).

Categoryaudio/AceStep SFT

Inputs (20)

NameTypeDefaultDescription
clipCLIPCLIP model (loaded via DualCLIPLoaderAudio or similar).
captionSTRINGText description of the music to generate (tags/caption).
lyricsSTRING[Instrumental]Lyrics for the music. Use [Instrumental] for instrumental tracks.
instrumentalBOOLEANtrueForce instrumental mode (overrides lyrics with [Instrumental]).
seedINT00–18446744073709550000
durationFLOAT60.00–600Duration in seconds. Set to 0 for auto duration from lyrics.
bpmINT00–300Beats per minute. 0 = auto (N/A, let model decide).
timesignatureCOMBOautoTime signature numerator. 'auto' = let model decide.
languageCOMBOenLanguage tag for lyrics conditioning.
keyscaleCOMBOautoKey and scale. 'auto' = let model decide.
generate_audio_codesoptBOOLEANtrueEnable LLM audio code generation for semantic structure.
lm_cfg_scaleoptFLOAT2.00–100LLM classifier-free guidance scale.
lm_temperatureoptFLOAT0.850–2LLM sampling temperature.
lm_top_poptFLOAT0.900–2000
lm_top_koptINT00–100
lm_min_poptFLOAT0.0000–1
lm_negative_promptoptSTRINGNegative text prompt for LLM CFG.
style_tagsoptSTRINGTags from the Music Analyzer node. Appended to caption when connected.
style_bpmoptINT00–300BPM from the Music Analyzer node. Overrides bpm when > 0.
style_keyscaleoptSTRINGKey/scale from the Music Analyzer node. Overrides keyscale when not empty.

Outputs (2)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING