Repository navigation
fix(cosyvoice): match non-CUDA model precision to inference inputs - #2253
Conversation
|
The PR appears safe to merge with no outstanding merge-changing issues identified. SummaryNormalizes CosyVoice LLM, flow, and vocoder components to float32 on non-CUDA hosts while preserving CUDA-selected precision, with regression coverage and synchronized documentation. Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: debpalash/VoiceStudio/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughCosyVoice now converts its LLM, flow, and vocoder components to float32 when CUDA is unavailable. Tests verify both CUDA paths, and documentation records the precision behavior. ChangesCosyVoice precision handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 7 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (7 passed)
Full details: Description checkResolution Add the missing template sections. List the key changes under Changes, select the applicable Type items, complete the Checklist including the smoke-matrix status, and include the required Release cadence text or confirm that it applies unchanged. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
CosyVoice can load bf16 LLM weights on a CPU-only host while its token inputs remain float32. Normalize the managed sidecar's LLM, flow and vocoder to float32 when CUDA is unavailable. CUDA precision remains unchanged, and existing models are retained.
Testing
Related to #2096. This repairs the reported dtype mismatch only; dependency installation, truncation and audible quality still require investigation, so it must not close that issue.
Stacked on #2244; retarget to main after that rollup lands. Full CI and review are required before merge.
When CUDA is unavailable, CosyVoice converts the LLM, flow, and vocoder weights to float32 to match float32 token inputs; CUDA precision remains unchanged. This prevents CPU dtype failures while retaining existing models. Tests cover both CUDA dtype preservation and non-CUDA behavior; dependency installation, truncation, and audio quality remain out of scope.