Foundation-1 Generate
Type a tag soup, get a tempo-synced loop
- model
- audio
- AUDIO
The model loader gets the attention for auto-downloading 4GB of weights. This node is the payoff: type some tags, pick a BPM, bars, and key, and out comes a sample loop that's actually in time and in key. Foundation-1 (RoyalCities, not to be confused with Stability's own Stable Audio line) was built for exactly this - structured, production-ready loops rather than the "here's a vaguely musical noise bed" you get from generic text-to-audio. If you're a producer who's been fighting audio models to hold tempo, this is the workflow you've been waiting for.
How it works
The node assembles your tags into the full prompt by appending bars, BPM, and key - so Synth Lead, Warm, Wide, Bright, Clean, Melody becomes …, 8 Bars, 140 BPM, E minor. Duration is computed for you from bars and BPM (round(bars × 4 / BPM × 60)), then k-diffusion sampling runs through the stable-audio-tools engine and decodes to a waveform. That's a latent-diffusion audio model doing its thing, same family of math as image diffusion but over mel-spectrogram latents. The pack quietly swaps in its own private k-diffusion for the call, then restores ComfyUI's - you never see it, and it's a genuinely thoughtful shim.
The inputs that matter
tags- your instrument, timbre, FX, and notation list, comma-separated. The README ships a full tag reference sheet (Master_Tag_Reference.md); trust the tags, not natural language. Don't put BPM, bars, or key in here - those are separate dropdowns.bpm(100–150) andbars(4 or 8) - set tempo and loop length; duration follows automatically.key- 24 western keys, major and minor. Default is E minor.steps(default 250) andcfg_scale(default 7.0) - quality vs. speed. 100–150 steps is the practical sweet spot; guidance 6–8. These behave exactly like their image-model cousins.sampler_type- defaults todpmpp-3m-sde, which the author recommends for quality.dpmpp-2m-sdeis slightly faster if you're impatient.seed- standard ComfyUI seed control.unload_after_generate- offload the model to CPU RAM after each run to free VRAM. On an 8GB card you want this on.torch_compile- first run slower, subsequent runs faster. Disable it if you hit errors; it's CUDA-only.sigma_min/sigma_max(0.3 / 500) - leave them. These are k-diffusion schedule bounds for people who know what they're doing.
There are two optional inputs worth a look. Connect any AUDIO output (a LoadAudio node, or a previous Generate) into audio and the node switches to variation mode - it re-noises your input and regenerates it guided by your tags, i.e. audio-to-audio remixing. init_noise_level (default 0.7) is the variation strength: 0.1–0.3 stays close to the source, 0.9+ is a creative reinterpretation. This is the feature that makes the pack more than a toy - drop in a rough idea, get back a polished take.
The single output, AUDIO, is a standard ComfyUI audio tensor with its sample rate - wire it into SaveAudio, VHS_VideoCombine, or any audio output node.
Installing and troubleshooting
Same pack as the loader: ComfyUI Manager (search "Foundation-1") or git clone plus python install.py. First run downloads the T5 encoder and weights, so have internet ready. The install traps are the same ones - never pip install stable-audio-tools without --no-deps (pandas 2.0.2 breaks on Python 3.13+), and let the pack manage its own k-diffusion copy.
Realistic gotchas on an 8GB card: out-of-memory mid-generation means turn on unload_after_generate, cut steps to 100–150, and close Discord. Slow generation? pip install sageattention for the attention backend, or use dpmpp-2m-sde. The model caps loops at 20 seconds, which the duration math already respects. And if you're not on NVIDIA - Flash attention makes this pack CUDA-only; forks exist for Mac/CPU, but the official one won't run.
The name overpromises a little - "Foundation-1" sounds like it does one thing, and honestly that's fine. It does one thing really well: in-key, in-tempo loops from a comma-separated sentence.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | FOUNDATION1_MODEL | Connect to Foundation1ModelLoader. | |
| tags | STRING | Synth Lead, Warm, Wide, Bright, Clean, Melody | Instrument, timbre, FX, and notation tags separated by commas. See the Tag Reference Sheet. Do NOT put BPM, Bars, or Key here — use the dropdowns below. |
| bpm | COMBO | 140 BPM | Tempo of the generated loop. |
| bars | COMBO | 8 Bars | Loop length in 4/4 bars. |
| key | COMBO | E minor | Musical key for the generated loop. |
| steps | INT | 25010–500 | Diffusion steps. Higher = better quality but slower. 100–250 is the practical range. The training demo used 250. |
| cfg_scale | FLOAT | 7.01–15 | Classifier-free guidance scale. Higher = stronger prompt adherence, less variation. 6–8 recommended. Training demo used 7. |
| seed | INT | 00–18446744073709550000 | Generation seed. Use ComfyUI's seed controls to randomise. |
| sampler_type | COMBO | dpmpp-3m-sde | Diffusion sampler. 'dpmpp-3m-sde' recommended for quality. 'dpmpp-2m-sde' is slightly faster. |
| sigma_min | FLOAT | 0.3000.001–10 | Minimum noise level for k-diffusion schedule. Default 0.3. |
| sigma_max | FLOAT | 50010–1000 | Maximum noise level for k-diffusion schedule. Default 500. |
| unload_after_generate | BOOLEAN | false | After generation, move the model from VRAM to CPU RAM. Frees VRAM while keeping weights in memory for a faster next run (avoids a full disk reload). When enabled, ComfyUI's native 'Free Memory' button will also clear the CPU copy. |
| torch_compile | BOOLEAN | false | Compile the model with torch.compile before the first generation. The first run after enabling will be slower (compilation warmup). Every subsequent run in the same session will be faster. Compiled state is cached — toggling off requires a model reload. Requires PyTorch 2.0+. CUDA only. Disable if you see errors. |
| audioopt | AUDIO | Optional input audio for variation generation. Connect an AUDIO output from another node (e.g. LoadAudio, or a previous Foundation1Generate output). When connected, the model will create a variation/interpretation of this audio guided by your prompt. Leave disconnected for standard text-to-audio generation. | |
| init_noise_levelopt | FLOAT | 0.700.01–1 | Variation strength when an input audio is connected. Lower values (0.1–0.3) produce output close to the input. Higher values (0.5–0.9) give more creative interpretations. 1.0 = maximum variation. Only used when audio input is connected. Recommended: 0.5–0.75 for musical variations. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |