MOSS 转写说话人模型加载器 · T8star-Aix
A model loader that checks hashes and won't fight your VRAM
- MOSS 模型
- 模型信息
Every workflow in the MOSS Transcribe Diarize pack starts here. T8_MOSS_ModelLoader finds the pinned MOSS-Transcribe-Diarize model on disk, verifies it's intact, and hands a model handle to the transcribe nodes. It's the pack's gatekeeper - and unlike most model loaders you've used, this one is lazy: the weights only get pulled into VRAM when transcription actually starts. The loader node itself is nearly free to run, which matters when you're chaining a loader into several transcribe paths.
The model is the OpenMOSS-Team MOSS-Transcribe-Diarize checkpoint (~0.9B params, roughly a 1.8GB safetensors file), pinned to a fixed Hugging Face revision. The pack is an independent integration - it's not an official OpenMOSS release, and the README says so plainly.
The inputs that matter
- model_name - a dropdown of models found under
ComfyUI/models/moss_transcribe_diarize(plus any paths registered inextra_model_paths.yaml). If you haven't downloaded the model yet, it shows[未找到] 请将模型放入 models/moss_transcribe_diarize. That's your cue to run the download script, not to panic. - device and precision -
autodoes the sensible thing: BF16 on a CUDA card that supports it, FP16 otherwise on CUDA, FP32 on CPU. You can forcebfloat16/float16/float32if you're experimenting, but auto is fine for 99% of cases. - memory_policy -
keep(resident, fastest),release_under_pressure(frees when free VRAM drops below 2GB or 20%), orrelease_after_run(most frugal). This is the knob to touch if you're sharing a card with other nodes. - attention_implementation -
autotries FlashAttention-2, then SDPA, then eager, in that order, and records each skip or failure. The pinned upstream code fixes a Transformers path that could silently pick eager attention and blow up VRAM quadratically on long audio. If you explicitly pick a backend and it fails, it errors loudly instead of quietly swapping - no silent fallback, by design. - verify_hashes - the loader always uses full-file SHA-256 for model identity; flipping this on also compares every file against the pinned manifest's expected digests. Slower, but it's the difference between "probably fine" and "proven intact."
- custom_model_path - absolute path for models living outside the standard tree.
Outputs: MOSS 模型 (the handle you wire into T8_MOSS_TranscribeDiarize or T8_MOSS_SmartLongAudio) and 模型信息 (a string with resolved device, actual dtype, memory policy, attention backend, and the revision - useful as a sanity check via a ShowText node).
Installing and getting the model
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-MOSS-Transcribe-Diarize-T8.git comfyui-MOSS-Transcribe-Diarize-T8
cd comfyui-MOSS-Transcribe-Diarize-T8
pip install -r requirements.txt # Windows Portable: ..\..\python_embeded\python.exe -m pip install -r requirements.txt
python scripts/check_transformers.py # enforces Transformers >= 5.5.0, < 6
python scripts/download_models.py --comfyui-root ..\..
The download script prints its target directory before starting, and refuses to guess if it can't find your ComfyUI root - it won't silently drop weights into custom_nodes. Requirements install av, librosa, soundfile, soxr, webrtcvad-wheels and friends, but deliberately do not touch torch or Transformers.
Where people get burned
- The model list is empty. You cloned the pack but never ran
download_models.py. The script is step three for a reason. - The loader refuses to run on an old Transformers. This pack enforces a 5.5.0 security minimum and rejects anything older; run
scripts/check_transformers.pyto see exactly where you stand. Fix withpip install -r requirements-transformers-v5.txt(5.15.1) once you've checked it won't break your other nodes. - VRAM pressure mid-workflow. The loader is lazy, but once transcription starts, a 10-minute clip can peak around 11.6GB. The 12GB baseline in the model-info string is the author telling you the truth: 8–10GB cards are only a short-audio compatibility tier. If you're squeezed,
release_under_pressureis your friend.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | [未找到] 请将模型放入 models/moss_transcribe_diarize | 1 options: [未找到] 请将模型放入 models/moss_transcribe_diarize |
| device | COMBO | auto | 2 options: auto, cpu |
| precision | COMBO | auto | auto:支持 BF16 的 CUDA 使用 BF16,否则 CUDA 使用 FP16,CPU 使用 FP32。 |
| release_after_run | BOOLEAN | false | 兼容旧工作流;开启时覆盖显存驻留策略。 |
| verify_hashes | BOOLEAN | false | 模型身份始终读取全文件 SHA-256;开启后还会与固定 manifest 的预期摘要逐项比对。 |
| memory_policy | COMBO | keep | 常驻最快;压力释放会在可用显存低于 2GB 或 20% 时释放;每次释放最省显存。 |
| attention_implementation | COMBO | auto | auto 按 FlashAttention-2、SDPA、eager 顺序显式尝试并记录结果;显式后端失败时直接报错,不静默回退。 |
| custom_model_pathopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MOSS 模型 | T8_MOSS_TRANSCRIBE_MODEL | — |
| 模型信息 | STRING | — |