From aa59dc50c781ed11ac6eed3a8baa9fa2ceb26429 Mon Sep 17 00:00:00 2001 From: tanhaoan333 Date: Fri, 12 Jun 2026 16:54:29 +0800 Subject: [PATCH] [bugfix]VoxCPM2 audio encoder adapt other than CUDA (#4374) Signed-off-by: tanhaoan333 --- vllm_omni/model_executor/models/voxcpm2/voxcpm2_talker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm_omni/model_executor/models/voxcpm2/voxcpm2_talker.py b/vllm_omni/model_executor/models/voxcpm2/voxcpm2_talker.py index 19df5bf89..3fcc683f3 100644 --- a/vllm_omni/model_executor/models/voxcpm2/voxcpm2_talker.py +++ b/vllm_omni/model_executor/models/voxcpm2/voxcpm2_talker.py @@ -283,7 +283,8 @@ def _encode_raw_audio( pad = (padding_size, 0) if padding_mode == "left" else (0, padding_size) audio = torch.nn.functional.pad(audio, pad) - feat = tts.audio_vae.encode(audio.to(tts.device), encode_sr).cpu() + vae_device = next(tts.audio_vae.parameters()).device + feat = tts.audio_vae.encode(audio.to(vae_device), encode_sr).cpu() return feat.view(tts.audio_vae.latent_dim, -1, tts.patch_size).permute(1, 2, 0)