Repository navigation
Support Fish Speech TTS inference on XPU platform - #4856
hsliuustc0106 merged 7 commits into
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
dcab72b to
f6a2232
Compare
Motivation: - Fish Speech (FishSpeechSlowARForConditionalGeneration) model cannot run on Intel XPU due to CUDA-specific API calls and memory constraints. - The offline inference script lacks --deploy-config support, inconsistent with other model examples in the framework. - Streaming mode loses audio data due to DELTA output draining. Technical details: 1. fish_kvcache_attn.py: Guard torch.cuda.is_current_stream_capturing() with torch.cuda.is_available() check to avoid RuntimeError on XPU where torch.cuda is a dummy module. 2. fish_qwen3_omni.yaml: Add platforms.xpu overrides reducing max_model_len to 2048 and increasing gpu_memory_utilization to 0.8 for stage-0, fitting within XPU memory constraints when two stages share a single device. 3. end2end.py: Add --deploy-config argument aligned with other offline inference scripts. Fix streaming mode to accumulate audio chunks across DELTA outputs instead of only saving the final (empty) chunk. Performance impact: - Enables Fish Speech S2 Pro end-to-end TTS on single Intel XPU (BMG/ARC). - No regression on CUDA path (original defaults unchanged). Workload mapping: - Fish Speech S2 Pro (fishaudio/s2-pro) text-to-speech on XPU. Signed-off-by: Liangyx2 <yuxiang.liang@intel.com>
Signed-off-by: Yuxiang Liang <yuxiang.liang@intel.com>
|
@xuechendi PTAL |
xuechendi
left a comment
There was a problem hiding this comment.
Overall looks good to me, please clean up suggestions for e2e.py example and then we can set as ready
Done. |
…uplication Extract _build_omni_kwargs() and _collect_audio_chunk() helpers to eliminate duplicated logic between main() and main_streaming() paths. Signed-off-by: Liangyx2 <yuxiang.liang@intel.com>
|
@Liangyx2 , please rerun example test locally and provide pass log. |
Add comment noting XPU platform overrides are verified on Intel Arc B60 (BMG, 24GB, 800 EUs). Signed-off-by: Liangyx2 <yuxiang.liang@intel.com>
Done. Updated output in Test Result. |
|
@hsliuustc0106 , PR looks good to me, PTAL |
Signed-off-by: Yuxiang <yuxiang.liang@intel.com>
Signed-off-by: Liangyx2 <yuxiang.liang@intel.com> Signed-off-by: Yuxiang Liang <yuxiang.liang@intel.com> Signed-off-by: Yuxiang <yuxiang.liang@intel.com> Co-authored-by: Chendi.Xue <chendi.xue@intel.com> Signed-off-by: y_null <y_null@qq.com>
Signed-off-by: Liangyx2 <yuxiang.liang@intel.com> Signed-off-by: Yuxiang Liang <yuxiang.liang@intel.com> Signed-off-by: Yuxiang <yuxiang.liang@intel.com> Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
Signed-off-by: Liangyx2 <yuxiang.liang@intel.com> Signed-off-by: Yuxiang Liang <yuxiang.liang@intel.com> Signed-off-by: Yuxiang <yuxiang.liang@intel.com> Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
Signed-off-by: Liangyx2 <yuxiang.liang@intel.com> Signed-off-by: Yuxiang Liang <yuxiang.liang@intel.com> Signed-off-by: Yuxiang <yuxiang.liang@intel.com> Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
Motivation
Technical details
Performance impact
Workload mapping
Test Plan
Quick start
python examples/offline_inference/text_to_speech/fish_speech/end2end.py
--deploy-config vllm_omni/deploy/fish_qwen3_omni.yaml
--text "Hello, this is a test of the Fish Speech text to speech system."
Voice cloning
prompt.wav
python examples/offline_inference/text_to_speech/fish_speech/end2end.py
--deploy-config vllm_omni/deploy/fish_qwen3_omni.yaml
--text "Hello, this is a cloned voice."
--ref-audio prompt.wav
--ref-text "testing my voices, why should I not?"
Streaming
python examples/offline_inference/text_to_speech/fish_speech/end2end.py
--deploy-config vllm_omni/deploy/fish_qwen3_omni.yaml
--text "Hello, this is a streaming test."
--streaming
Test Result
Quick start
output_0_c4bf9699-8798-4ef2-beec-6073c522d709.wav
pass_1.log
Voice cloning
output_0_658b1f39-a1f0-4a97-b3a9-ddeb4ab1984c.wav
pass_2.log
Streaming
output_0.wav
pass_3.log