Nodes/ComfyUI-SemBridge/SemBridge Loader
ComfyUI Node

SemBridge Loader

Get the model folder right or nothing else in this pack works

By hiroki-abe-58·Created 2 days ago·Updated about 15 hours ago· 1
SemBridge Loader
    • model
    ◄model_dir▾►
    ◄dtypebfloat16►
    ◄deviceauto►
    ◄keep_loadedtrue►
    ◄codec_numericsreproducible►

    SemBridge is a speech-and-singing model from ASLP-lab at Northwestern Polytechnical University - one autoregressive model that does text-to-speech, singing voice synthesis, and mixed speech-plus-singing that holds a single voice across both. This pack wraps it for ComfyUI, running the official code in-process and handing you a normal AUDIO output at mono 44.1 kHz.

    The Loader is the node you cannot skip. It points at a model folder, picks precision and device, and passes back one SEMBRIDGE_MODEL wire that Text to Speech, Singing, and Speech + Singing all take as their first input.

    First thing to know: the pack ships no weights. The node code is MIT, the weights are a separate ~4.3 GB download from ASLP-lab/SemBridge on Hugging Face, Apache-2.0 on the model card.

    What's actually happening under the widget

    The Loader is lazier than it looks, and that's a good thing. It doesn't load the network when you queue it - it validates your choices and returns a small handle holding the folder path, dtype, device and codec_numerics. The real from_pretrained happens the first time a generation node asks for it, and from then on the pack keeps exactly one resident model in a slot keyed on (path, dtype, device).

    Three consequences you'll feel in normal use. Swapping dtype mid-session costs a full reload (about six seconds with a warm file cache). Pointing a second Loader at a different folder frees the first one instead of stacking. And keep_loaded is checked after a job finishes, which is why turning it off doesn't stop the model from being loaded at all, just from staying loaded.

    The inputs worth setting

    model_dir is a dropdown of subfolders inside models/sembridge. The list is built by scanning for folders that contain the full official file set, and it's built once when the nodes register at startup - so if you drop a model in after ComfyUI is already running, restart it. A folder with a missing tokenizer file simply won't be listed, with no error explaining why. That silence is the single most common way people get stuck here.

    dtype defaults to bfloat16, which is the official GPU setting. float32 fits too - 4.5 GiB versus roughly 2.9 GiB at bfloat16 - but you generally don't need it. One gotcha: if you pick device: cpu, the runtime quietly forces float32, because the official loader refuses half precision on CPU. Your bfloat16 setting becomes float32 and the node won't apologise.

    keep_loaded is on by default and you should leave it on while you're iterating, because generation runs at 1.2 to 1.6 times real time for speech. Turn it off, or wire up SemBridge Unload at the end, if the same graph also loads a video model - otherwise you're parking about 3 GB of VRAM under a Wan checkpoint.

    codec_numerics is the optional fifth input and the one genuinely nerdy knob. The official codec computes its Snake activation in a TorchScript function that re-optimises after its first calls, so with the official code the first generation after loading rounds slightly differently from every later one - the pack measured 69 patches on the first call and 67 afterwards, same seed. reproducible (default) evaluates the same formula with ordinary PyTorch ops so every run matches, and costs about 10 ms per 16 seconds of decoded audio. official-torchscript keeps the official function, which you want only to byte-match the upstream command line. Take the default.

    Output

    One output: model, type SEMBRIDGE_MODEL. Wire it into any of the three generation nodes. Tokenizer and both 44.1 kHz codecs ride inside that same handle, so there's no second loader and no separate VAE-style wire to hook up.

    Install

    You need ComfyUI recent enough to have the V3 node API (v0.38.0 was used), Python 3.10+, and an NVIDIA GPU for anything resembling reasonable speed.

    cd ComfyUI/custom_nodes
    git clone https://github.com/hiroki-abe-58/ComfyUI-SemBridge
    python -m pip install -r ComfyUI-SemBridge/requirements.txt
    python ComfyUI-SemBridge/tools/download_model.py --models-dir ComfyUI/models/sembridge
    

    That requirements file is soundfile, full stop - no PyAV, no vendored torch, nothing that fights ComfyUI's stack. The download script pulls the pinned revision, drops it into its own subfolder under models/sembridge, and checks SHA-256 on the three weight files. Download by hand and the whole official set has to be there - generator, both codecs, both codec configs, the tokenizer files. An extra_model_paths.yaml block named sembridge works too if your models live on another drive.

    Then restart ComfyUI and load a workflow from workflows/gui/.

    Where people get burned

    Don't pip install sembridge. The PyPI-ish package metadata pins torch below 2.9, and the model code is already vendored inside this pack, unmodified. Installing it is the fastest way to break your ComfyUI torch.

    Flat files instead of a folder. The scanner looks one level deep: models/sembridge/<anything>/config.json. Dump the Hugging Face snapshot straight into models/sembridge/ and the dropdown stays empty.

    An older ComfyUI. These nodes are written against comfy_api.latest with no NODE_CLASS_MAPPINGS fallback, so a stale install fails at import rather than degrading gracefully - that's "this pack is new", not "this pack is broken". Update first, then debug.

    Verified on Windows only. The author tested Windows 11 on an RTX 5090 and says plainly what wasn't checked: Linux or macOS with a GPU, AMD and Apple GPUs, fp8, multi-GPU. On a 7900 XTX you're the test.

    Categoryloaders/sembridge

    Inputs (5)

    NameTypeDefaultDescription
    model_dirCOMBOA folder in models/sembridge holding the complete official SemBridge files
    dtypeCOMBObfloat16bfloat16 is the official GPU setting. The CPU path always runs float32.
    deviceCOMBOauto3 options: auto, cuda, cpu
    keep_loadedBOOLEANtrueKeep the model in memory after the job. Turn off to free VRAM for other models after every generation.
    codec_numericsoptCOMBOreproduciblereproducible: the same request gives the same audio on every run (plain PyTorch ops for the codec's Snake activation). official-torchscript: the official TorchScript function; its first call after loading rounds differently from later calls, so the first run can differ from the rest.

    Outputs (1)

    NameTypeDescription
    modelSEMBRIDGE_MODEL—