From a3c3e1a250072a54c12ef03d5cb7cfd51bdc6f05 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期二, 27 六月 2023 17:41:21 +0800
Subject: [PATCH] update

---
 funasr/tasks/abs_task.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/funasr/tasks/abs_task.py b/funasr/tasks/abs_task.py
index 0fb77a9..0d848a9 100644
--- a/funasr/tasks/abs_task.py
+++ b/funasr/tasks/abs_task.py
@@ -1150,6 +1150,7 @@
     def main_worker(cls, args: argparse.Namespace):
         assert check_argument_types()
 
+        args.ngpu = 0
         # 0. Init distributed process
         distributed_option = build_dataclass(DistributedOption, args)
         # Setting distributed_option.dist_rank, etc.
@@ -1252,9 +1253,13 @@
             raise RuntimeError(
                 f"model must inherit {FunASRModel.__name__}, but got {type(model)}"
             )
+        #model = model.to(
+        #    dtype=getattr(torch, args.train_dtype),
+        #    device="cuda" if args.ngpu > 0 else "cpu",
+        #)
         model = model.to(
             dtype=getattr(torch, args.train_dtype),
-            device="cuda" if args.ngpu > 0 else "cpu",
+            device="cpu",
         )
         for t in args.freeze_param:
             for k, p in model.named_parameters():

--
Gitblit v1.9.1