Nodes/MOSS SoundEffect v2/MOSS SoundEffect v2 加载
ComfyUI Node

MOSS SoundEffect v2 加载

MOSS SoundEffect v2 in ComfyUI

By HuizhiXu·Created 23 days ago·Updated 22 days ago· 1
MOSS SoundEffect v2 加载
    • pipeline
    ◄model▾►
    ◄deviceauto►
    ◄dtypebfloat16►
    ◄vram_managementauto►
    ◄python►

    The name is misleading in a useful way: this node loads nothing. No weights, no VRAM, no Torch import into ComfyUI at startup. It's a pointer - it picks a model folder and a device, and hands the generate node a small dictionary telling it what to load. Weights move only when you actually generate.

    That distinction is the entire design of this pack, so it's worth understanding before you touch a dropdown.

    Why it works this way

    Audio packs in ComfyUI have a well-earned reputation for wrecking installs. The standard failure is documented: every custom node's requirements.txt installs into the same Python as ComfyUI, so a pack wanting transformers==4.30 and another wanting >=4.40 resolve however pip feels like it, and one of them silently breaks. Audio tooling is the worst offender because it tends to want specific transformers, diffusers and numpy versions at once. This pack dodges the whole category: ComfyUI imports it cheaply (the node file deliberately does not import the inference stack), and when you hit Queue a worker starts in a separate interpreter that's been probed and verified. The two sides talk over stdin/stdout, one JSON line per message. The loader's job is picking that interpreter and the model folder.

    The fields

    • model - a dropdown of directories under ComfyUI/models/moss-soundeffect-v2/. A directory only shows up if it contains model_index.json. With nothing installed, the single entry reads 未找到模型 - "model not found" - and running the node raises with the download instructions in the error text.
    • device - auto by default, and the author's tooltip says what you need: auto uses the first visible CUDA device, and numbering follows CUDA_VISIBLE_DEVICES, not the physical slots on your motherboard. Hide cards with that variable and cuda:0 is the first card you exposed. cpu is always there, plus an mps entry when PyTorch reports it.
    • dtype - bfloat16 (default), float16, or float32. Leave it alone unless you have a specific reason. bfloat16 is the right default for a diffusion transformer.
    • vram_management - auto, on, off. The tooltip is precise: on auto, the pack offloads idle modules to system RAM when your VRAM is under 20GB. On a small card this is what makes the difference between running and not; on a 24GB+ card off saves you the shuffling.
    • python - optional and empty by default. Fill it with an interpreter path if you already have a working environment, or set the environment variable MOSS_SFX_PYTHON instead. Whitespace-free and empty is the correct value for most people.

    The only output is pipeline, a MOSS_SFX_PIPE - a custom wire type that only this pack understands. There's nothing you can plug it into except the generate node.

    What happens when you leave python empty

    The pack probes interpreters in order, and the probe is a real import test (audiotools, torch, and the vendored inference code), not a version check:

    1. Whatever you typed in python, or MOSS_SFX_PYTHON.
    2. ComfyUI's own interpreter. If it can import the inference code, use it.
    3. An existing .venv inside the node folder.
    4. Otherwise: build a Python 3.12 environment inside the node folder with uv and install Torch 2.9 plus the runtime requirements there. Once. Nothing touches ComfyUI's packages.

    Step 4 picks the Torch wheel from your driver's CUDA version - cu128 on CUDA 12.8 or newer, cu126 on 12.6/12.7 - and refuses outright on older drivers, on ROCm, and on macOS, because it won't install a CUDA wheel into an environment that can't use it. That refusal is a feature, not a bug: on those systems you create or point at your own interpreter and put its path in python.

    This is also what makes the pack tolerable next to your other nodes: nothing it installs can downgrade the transformers your image workflow depends on. The cost is a duplicate Torch on disk and a real first-run setup delay.

    Install

    Manager, searching MOSS SoundEffect v2, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HuizhiXu/comfyui-moss-soundeffect-v2
    

    Then get the weights - the pack never downloads them for you:

    huggingface-cli download OpenMOSS-Team/MOSS-SoundEffect-v2.0 \
      --local-dir ComfyUI/models/moss-soundeffect-v2/MOSS-SoundEffect-v2.0
    

    Restart or hit refresh, and the folder appears in model.

    Troubleshooting the loader

    model only offers "未找到模型". The folder isn't there, or the model_index.json that marks a diffusers-style checkpoint is missing - a half-finished download is the usual culprit. The recursive scan stops descending as soon as it finds one, so a nested copy of the same model won't show twice.

    Errors on load about the interpreter. The pack reports probe failures with the interpreter's actual stderr attached, which is more than most packs do. Read it - it's almost always a missing audiotools or a Torch built against a CUDA runtime your driver doesn't match. pip install descript-audiotools into that interpreter is the fix, or just delete the node's .venv and let it rebuild.

    The dropdown changed and now generation is slow again. Any change to model, device, dtype or vram management is a different worker: the old process stops, weights reload, the DiT recompiles. The loader is a key, not a cache. Set it once and leave it.

    Categoryaudio/moss

    Inputs (5)

    NameTypeDefaultDescription
    modelCOMBOComfyUI/models/moss-soundeffect-v2/ 里已放好的模型目录
    deviceCOMBOautoauto 使用第一张可见的 CUDA 设备。序号跟着 CUDA_VISIBLE_DEVICES,不是机器上的物理卡号
    dtypeCOMBObfloat163 options: bfloat16, float16, float32
    vram_managementCOMBOautoauto:显存低于 20GB 时,把暂时不用的模块卸到内存
    pythonoptSTRING留空则自动探测。已有可用环境时填写该解释器路径,或设置环境变量 MOSS_SFX_PYTHON

    Outputs (1)

    NameTypeDescription
    pipelineMOSS_SFX_PIPE—