fix: add install.py to prevent omnivoice from overwriting ComfyUI's torch

This commit is contained in:
2026-04-05 14:53:33 +02:00
parent b273f8f2d7
commit f647a24988
3 changed files with 38 additions and 5 deletions
+3 -4
View File
@@ -18,15 +18,14 @@ A ComfyUI custom node for [OmniVoice](https://github.com/k2-fsa/OmniVoice) — a
git clone https://github.com/ethanfel/ComfyUI-Omnivoice.git git clone https://github.com/ethanfel/ComfyUI-Omnivoice.git
``` ```
2. Install dependencies: 2. Install dependencies **without overwriting ComfyUI's torch**:
```bash ```bash
pip install omnivoice python install.py
``` ```
> **Warning:** Do NOT run `pip install omnivoice` directly — it pins `torch==2.8.*` from a CUDA 12.8 index and will overwrite ComfyUI's torch installation.
3. Restart ComfyUI. The nodes will appear under the **OmniVoice** category. 3. Restart ComfyUI. The nodes will appear under the **OmniVoice** category.
> **Note:** OmniVoice requires PyTorch 2.8+ and a CUDA-capable GPU (or Apple Silicon).
## Nodes ## Nodes
### OmniVoice Model Loader ### OmniVoice Model Loader
+32
View File
@@ -0,0 +1,32 @@
"""
Installation script for ComfyUI-Omnivoice.
ComfyUI Manager runs this file instead of pip-installing requirements.txt directly.
We install omnivoice with --no-deps to avoid overwriting ComfyUI's torch installation.
omnivoice pins torch==2.8.* from a CUDA 12.8 custom index which would break ComfyUI.
"""
import subprocess
import sys
def pip(*args):
subprocess.check_call([sys.executable, "-m", "pip", "install", *args])
# Install omnivoice itself without pulling in its torch/torchaudio pins.
# ComfyUI ships its own torch build — let it manage torch.
pip("omnivoice", "--no-deps")
# Install omnivoice's runtime inference dependencies (excludes torch, torchaudio,
# gradio, tensorboardX, webdataset which are training/demo-only tools).
pip(
"transformers>=5.0.0",
"accelerate",
"pydub",
"soundfile",
"numpy",
)
print("\n[ComfyUI-Omnivoice] Installation complete.")
print("[ComfyUI-Omnivoice] NOTE: omnivoice was installed without its pinned torch.")
print("[ComfyUI-Omnivoice] If you encounter errors, ensure torch>=2.0 is installed.")
+3 -1
View File
@@ -1 +1,3 @@
omnivoice # Dependencies are managed by install.py to avoid overwriting ComfyUI's torch.
# omnivoice pins torch==2.8.* (CUDA 12.8) which would break ComfyUI's torch build.
# Do not add omnivoice here — install.py handles it with --no-deps.