Nodes/ComfyUI-Replicate/Replicate nateraw/musicgen-songstarter-v0.2
ComfyUI Node

Replicate nateraw/musicgen-songstarter-v0.2

AI-generated loops for producers

By replicate·Created 2 years ago·Updated 2 years ago· 206
Replicate nateraw/musicgen-songstarter-v0.2
  • input_audio
  • AUDIO
prompt
duration8
continuationfalse
continuation_start0
continuation_end
normalization_strategyloudness
top_k250
top_p0.00
temperature1.00
classifier_free_guidance3
output_formatwav
seed
force_rerunfalse

This isn't general-purpose MusicGen - it's a version fine-tuned specifically to spit out short instrumental loops you can build a track around: drum-and-melody starters for producers who want a seed idea rather than a finished song. nateraw fine-tuned it on top of Meta's MusicGen and put it on Replicate; this node calls that hosted model. Type a genre/mood/instrument description, get back a short audio loop.

Notice the schema has no required inputs at all - every field, including prompt, is optional. You genuinely can queue this node with nothing set and it'll generate something (an unguided default loop), though in practice you'll almost always want to at least fill in a prompt to point it somewhere specific.

How it works

MusicGen generates audio as discrete tokens conditioned on your text description (and optionally an audio clip), sampling its way through a sequence the way a language model samples text tokens, then decoding that sequence back into waveform. The songstarter fine-tune biases it toward short, loopable, producer-friendly output rather than full compositions. Everything runs on Replicate - you send the request, get AUDIO back.

The inputs and outputs that matter

  • prompt - describe the loop: genre, instruments, mood, tempo. More specific gets you more usable results ("dark trap beat, 808 bass, hi-hats, moody piano" beats "cool beat").
  • input_audio - feed an existing clip to continue or reference instead of generating from scratch.
  • continuation (default false) plus continuation_start / continuation_end - when true, treats input_audio as something to extend from a specific point rather than just a style reference.
  • duration (default 8, seconds) - how long the loop runs.
  • output_format (default wav, or mp3).

Sampling knobs: top_k (250), top_p (0, meaning it samples via top-k by default, not nucleus sampling), temperature (1), classifier_free_guidance (3) - leave these at defaults until you have a reason to touch them. normalization_strategy (default loudness, also clip/peak/rms) controls how the output level gets normalized. seed and force_rerun round it out. Output is AUDIO.

How to install it

One install covers every node in this pack.

cd ComfyUI/custom_nodes
git clone https://github.com/replicate/comfyui-replicate
cd comfyui-replicate
pip install -r requirements.txt

Restart, or via ComfyUI Manager: search ComfyUI-Replicate, install, restart. Set your token first:

export REPLICATE_API_TOKEN="r8_************"; python main.py

Token from replicate.com/account/api-tokens. Nothing runs locally - this is entirely Replicate's compute.

Common issues & troubleshooting

Flag this up front: the pack's README states it's built for models returning simple text or image output and specifically warns that audio-returning models "will not work as expected" - audio support is called out as still on the roadmap. This node returns AUDIO, so if saving or previewing the clip acts up, that's the pack's documented rough edge, not something wrong with your workflow.

Node errors immediately. Missing REPLICATE_API_TOKEN in the environment ComfyUI launched from - the most common first-run issue in this whole pack. On portable Windows builds specifically, a token set as a global environment variable has been reported not to get picked up automatically; set it in the launch .bat instead.

Loop sounds generic. Put more detail in the prompt before touching sampling parameters - instruments, genre, tempo, mood get you further than adjusting temperature or classifier_free_guidance.

Continuation didn't work as expected. continuation has to be explicitly set to true, and continuation_start/continuation_end need to point at valid points inside input_audio - leaving these unset while expecting an extension is the usual mistake.

Cost adds up on iteration. A longer duration and more variations both mean more billed Replicate predictions - iterate short, extend once you like the direction.

CategoryReplicate

Inputs (14)

NameTypeDefaultDescription
promptoptSTRING
input_audiooptAUDIO
durationoptINT8
continuationoptBOOLEANfalse
continuation_startoptINT0
continuation_endoptINT
normalization_strategyoptCOMBOloudness4 options: loudness, clip, peak, rms
top_koptINT250
top_poptFLOAT0.00
temperatureoptFLOAT1.00
classifier_free_guidanceoptINT3
output_formatoptCOMBOwav2 options: wav, mp3
seedoptINT
force_rerunoptBOOLEANfalse

Outputs (1)

NameTypeDescription
AUDIOAUDIO