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:
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
|
||||
|
||||
Reference in new issue
Block a user