Nodes/Foundation-1/Foundation-1 Model Loader
ComfyUI Node

Foundation-1 Model Loader

The node that fetches the music model for you

By Saganaki22·Created 6 months ago·Updated 5 months ago· 109
Foundation-1 Model Loader
    • model
    model
    attentionauto

    Foundation-1 isn't a Stability model, despite the stable-audio-tools underneath - it's a community text-to-sample model by RoyalCities that turns structured tags into tempo-synced musical loops. This loader is the boring half of the two-node pack, and that's the point. You'll touch it once, run it, and never think about it again. The "boring" part is doing real work: it finds (or downloads) a ~3GB checkpoint plus a ~900MB T5 text encoder, then caches the whole thing so the Generate node doesn't re-read disk every run.

    If you've installed an SD checkpoint before, you'll notice the difference immediately. There's no "put the file in the right folder" ritual here. The loader scans ComfyUI/models/stable_audio/ for a .safetensors file paired with a model_config.json; if neither exists, it auto-downloads both from RoyalCities/Foundation-1 on HuggingFace into models/stable_audio/Foundation-1/. That first run needs an internet connection and a few minutes of patience. After that it works offline. The loaded model is cached in memory and only reloads when the checkpoint, device, or attention type changes - so re-running your workflow is cheap.

    Only two inputs exist, and only one of them is interesting:

    • model - dropdown listing whatever checkpoints the node found in stable_audio/. With a fresh install it just says the auto-downloaded Foundation-1/Foundation_1.safetensors.
    • attention - auto (default), sdpa, flash_attention_2, or sageattention. auto picks SageAttention if you have it installed, otherwise falls back to PyTorch's SDPA. If you're on an NVIDIA card you can leave it alone; changing it unloads and reloads the model, so it's not something you flip mid-session.

    The single output, model (type FOUNDATION1_MODEL), feeds directly into Foundation-1 Generate - that's the whole point of this node. Loader → Generate → any ComfyUI audio output node.

    Installing it

    ComfyUI Manager: search "Foundation-1" and hit install. Or the manual route, which also runs the dependency installer:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Saganaki22/ComfyUI-Foundation-1.git
    cd ComfyUI-Foundation-1
    python install.py
    

    install.py pulls stable-audio-tools --no-deps, a handful of einops-family packages, and a private copy of k-diffusion==0.1.1 into k_diffusion_files/ so it doesn't fight ComfyUI's bundled version. Two hard rules from the README: never pip install stable-audio-tools without --no-deps (it drags in pandas==2.0.2, which breaks on Python 3.13+), and never install k-diffusion into site-packages. The auto-installer is also wired into __init__.py, so startup often handles all of this for you.

    Where people get burned

    • CUDA only. The model uses Flash/SDPA attention, so macOS and CPU aren't supported by this pack (community forks add them, but you're on your own there). You want an NVIDIA GPU with 8GB VRAM.
    • Download fails or is slow. First run needs internet for ~3.9GB. If it errors offline, the README tells you to grab the two files manually with huggingface-cli download RoyalCities/Foundation-1 --local-dir ComfyUI/models/stable_audio/Foundation-1.
    • "No module named 'stable_audio_tools'." This means the auto-installer didn't run - usually because you cloned without install.py. Run the command above with the --no-deps flag and restart.

    It's a quiet node, but the mechanism underneath is carefully done. Set it up once, wire it to Generate, and it becomes furniture.

    Categoryaudio/Foundation-1

    Inputs (2)

    NameTypeDefaultDescription
    modelCOMBOFoundation-1 .safetensors checkpoint. If no model is found it will be downloaded automatically from huggingface.co/RoyalCities/Foundation-1 on first run.
    attentionCOMBOauto'auto' uses SageAttention if installed, otherwise SDPA. 'sdpa' enables all PyTorch SDPA backends (uses Flash internally if available). 'flash_attention_2' forces the Flash SDP backend only (CUDA only). 'sageattention' monkey-patches F.sdpa with SageAttention (CUDA only — requires: pip install sageattention). Changing this setting unloads and reloads the model.

    Outputs (1)

    NameTypeDescription
    modelFOUNDATION1_MODEL