Fix Qwen3-TTS Base on NPU running failed (#2353)

Signed-off-by: LL <rimchew@foxmail.com>
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Co-authored-by: Canlin Guo <canlinguosdu@gmail.com>
This commit is contained in:
LLandCanlin Guo authored and GitHub committed 2026-03-31 12:42:21 +08:00
1 parent 837679dbaa
commit 12a8f57934
1 file changed
+1 -1
@@ -1122,7 +1122,7 @@ class Qwen3TTSTalkerForConditionalGeneration(nn.Module):
)
# Prefer GPU for encoder if available; otherwise keep CPU.
dev = next(self.parameters()).device
if getattr(dev, "type", None) == "cuda":
if dev.type != "cpu":
try:
tok.model.to(dev)
tok.device = dev