feat: support CosyVoice3 in webui.py#1888
Open
jasagiri wants to merge 2 commits into
Open
Conversation
CosyVoice3's LLM requires an <|endofprompt|> token in prompt_text (zero-shot) or tts_text (cross-lingual). webui.py passed user input straight through, so CosyVoice3 zero-shot / cross-lingual failed with "AssertionError: <|endofprompt|> not detected". Prepend the system prompt when the loaded model is a CosyVoice3 instance; the CosyVoice and CosyVoice2 paths are unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
torchaudio removed torchaudio.info in 2.11, so webui.py's prompt-wav validation failed with AttributeError. Use soundfile.info instead, consistent with the soundfile-based load_wav. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webui.py predates CosyVoice2/3 and does not work with CosyVoice3:
This prepends the system prompt for CosyVoice3 models (CosyVoice / CosyVoice2 paths unchanged) and switches the sample-rate check to soundfile.info.
The instruct path still uses the CosyVoice-1.0-only inference_instruct; migrating it to inference_instruct2 needs UI changes and is left out of scope.
Test plan