Files
ComfyUI-Omnivoice/install.py
T
Ethanfel 5dfaa0b300 Replace torchaudio.save with soundfile.write; add EPUB loader node
- nodes/generator.py: swap torchaudio.save for soundfile.write to avoid
  torchcodec/FFmpeg dependency crash in environments without FFmpeg shared libs
- nodes/epub_loader.py: new OmniVoiceEpubLoader node for loading EPUB chapters
- tests/test_epub_loader.py: 8 tests for the EPUB loader
- install.py: add beautifulsoup4 to runtime deps
- __init__.py, nodes/__init__.py: register OmniVoiceEpubLoader

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 17:24:18 +02:00

34 lines
1.1 KiB
Python

"""
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",
"beautifulsoup4",
)
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.")