OmniVoice chunks long text internally; each chunk is a separate diffusion
pass with different random noise, causing voice drift between paragraphs.
Setting the same seed before each generate() call anchors the RNG state
and keeps the voice consistent. seed=0 means random (default behaviour).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
get_text(separator=' ') collapsed all paragraphs into one line.
Now inserts \n\n at block-level element boundaries (p, h1-h6, div,
li, br, tr) before extraction, then normalises whitespace.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Models always download to ComfyUI/models/omnivoice/ via HuggingFace.
Local path added unnecessary complexity; users who want a custom path
can symlink into the models directory.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Model Loader → Load Audio → OmniVoice Generate → Save Audio.
Connect a Whisper node to ref_text for auto-transcription.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Users should connect a ComfyUI Whisper node to ref_text instead of
relying on omnivoice's internal ASR. Removes the error-catch workaround
and updates the tooltip accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
requirements.txt cannot install omnivoice (it would pull in torch==2.8.*
and break ComfyUI). install.py now does exactly one thing: install
omnivoice --no-deps, skipped if already present. All other deps remain
in requirements.txt for ComfyUI Manager to handle normally.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
install.py was running arbitrary pip installs as part of node loading,
which is dangerous in a shared venv. Standard approach: requirements.txt
lists the safe deps (transformers, accelerate, soundfile, etc.);
omnivoice itself must be installed once manually with --no-deps to avoid
overwriting ComfyUI's torch. README documents this clearly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The cap was wrong — it would downgrade transformers in shared venvs and
break other nodes. The torchcodec issue is handled in code now.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
install.py: restore transformers>=5.0.0 (capping it would break other nodes).
generator.py: catch the torchcodec RuntimeError that fires when ref_text is
blank and transformers 5.x auto-transcription requires missing FFmpeg libs.
Raises a human-readable error telling the user to fill in ref_text manually.
Also updates the ref_text tooltip to recommend providing it explicitly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
transformers 5.x unconditionally imports torchcodec in its ASR pipeline
preprocess step, which crashes in environments without FFmpeg shared libs.
4.x does not have this dependency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap `from omnivoice import OmniVoice` in a try/except ImportError, setting
OmniVoice=None when absent. Add a clear runtime ImportError in load_model()
so users get an actionable message. Allows `from nodes.loader import
OmniVoiceModelLoader` to succeed outside of pytest (where conftest.py injects
the mock) while keeping all 13 tests green.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove OmniVoice = None fallback in nodes/loader.py so missing omnivoice
gives a clear ImportError instead of a confusing AttributeError. Restore
__init__.py to clean form without the try/except that silently swallowed
real import errors. Add omnivoice mock to conftest.py and register a
pytest plugin that prevents pytest from treating the project root as a
Package node (which would try to import __init__.py outside a package
context and fail on the relative import).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements OmniVoiceModelLoader with INPUT_TYPES, RETURN_TYPES, and
load_model supporting both HuggingFace auto-download and local path
sources. Adds TDD test suite and pytest infrastructure (conftest.py,
pytest.ini) to enable testing outside ComfyUI without omnivoice installed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>