ComfyUI custom nodes for
pymss, a Python music source separation package.
## Nodes
- `MSS Separate`: separates a ComfyUI `AUDIO` stream with catalog MSS/non-VR pymss models.
- `MSS Separate List`: list-output variant of `MSS Separate`.
- `Custom MSS Separate`: separates audio with user-provided MSS models from the custom model folder.
- `Custom MSS Separate List`: list-output variant of `Custom MSS Separate`.
- `VR Separate`: separates a ComfyUI `AUDIO` stream with VR/UVR pymss models.
- `VR Separate List`: list-output variant of `VR Separate`.
- `MSS Params`: optional parameter input for `MSS Separate` and `Custom MSS Separate`.
- `VR Params`: optional parameter input for `VR Separate`.
- `Load Audio`: loads one audio file and outputs both the audio stream and the file name without extension.
- `Audio Invert Phase`: inverts audio input `a` and outputs `-a`.
- `Audio Normalize`: normalizes only when the peak is above 0 dBFS.
- `Audio Ensemble`: combines 2 to 10 audio inputs with selectable ensemble algorithms and weights.
- `Save Audio`: saves ComfyUI `AUDIO` streams as `wav`, `flac`, or `mp3`.
> [!IMPORTANT]
> Workflows created in v1.0.x are not backward-compatible with v1.1.0+ workflows due to node type renaming.
## Installation
Clone or download this repository, put it into your ComfyUI `custom_nodes` folder. The custom nodes load automatically when you start ComfyUI. Make sure to install `pymss` in the same Python environment as ComfyUI. Or you can use `comfyui_manager` to install this custom node.
This revision requires `pymss>=2.1.6` for BS PolarFormer support (`pymss-core` 0.1.9).
Until those releases are published, development requires the matching local pymss
and pymss-core checkouts; the new requirement cannot yet be installed from PyPI.
From this repository, install the two sibling checkouts with ComfyUI's Python:
`python -m pip install -e ../pymss-core -e ../pymss`.
```bash
ComfyUI/custom_nodes
└──comfy-mss
├── comfy_mss
├── web
├── nodes.py
└── ...
```
### Project Structure
- `comfy_mss`: main package folder.
- `web`: frontend files.
- `examples`: example ComfyUI workflows.
- `nodes.py`: defines custom nodes.
- `requirements.txt`: Python dependencies.
## Separation Nodes
### Model Folder
Model files default to: `ComfyUI/models/pymss`. The folder is created automatically when the custom node loads.
The separator nodes do not expose model folder widgets, so shared workflows do not contain machine-specific model paths. The model folder can be changed with environment variables:
- `COMFY_MSS_MODEL_DIR`
- `PYMSS_MODEL_DIR`
You can also configure an extra ComfyUI model path by copying `extra_model_paths.yaml.example` to `extra_model_paths.yaml` and adding an independent pymss config group:
```yaml
comfy-mss:
pymss: E:/AI/Pymss-Studio/models
```
The outer `comfy-mss` is only the config group name. The inner `pymss` is the actual ComfyUI model folder key used by comfy-mss. Custom models are always stored in the `custom` directory below each registered `pymss` model folder.
If multiple `pymss` model folders are registered, comfy-mss scans them when checking whether catalog models are already downloaded. Downloads use the default `pymss` folder.
### MSS/VR Separate
`MSS Separate` and `VR Separate` inputs:
- `audio`: ComfyUI `AUDIO`.
- `model_name`: pymss catalog model name.
- `device`: `auto`, `cpu`, `cuda`, `mps`, or `mlx`.
- `download_missing`: defaults to `true`.
- `source`: `modelscope`, `huggingface`, or `hf-mirror`, select `huggingface` if you have access to HuggingFace.
- `params`: optional params node output.
- `device_ids`: defaults to `0`.
- `debug`: prints pymss debug and timing information when enabled.
The list variants, `MSS Separate List` and `VR Separate List`, use the same inputs and model menu behavior as their matching separate nodes. Instead of creating one audio/text output pair per stem, they return two list outputs:
- `audios`: separated stem audio list.
- `stem_names`: matching stem name list.
All separation nodes resample incoming audio to the sample rate declared by the selected model before inference.
Returned ComfyUI `AUDIO` values carry that model sample rate. This keeps the frequency and time axes aligned
with the model's training configuration; downstream save nodes may still explicitly convert the result to another output rate.
For catalog versions that do not include a model's complete stem list, an undownloaded model keeps the node's generic
output slots instead of deleting possible residual stems. After its YAML config is available, use `Refresh Models` to
replace those placeholders with the configured stem names. Execution always reads the complete stem list from the loaded model.
### Custom MSS Separate
`Custom MSS Separate` supports MSST models only; VR/UVR models are not supported by this custom-model workflow. It scans the `custom` folder located under the pymss model root: `