From da340e6a6cf8680878a083f5c1b18775dc0c686f Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 12 四月 2024 15:01:54 +0800
Subject: [PATCH] add
---
funasr/auto/auto_model.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index 830d88c..630c390 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -211,6 +211,9 @@
else:
print(f"error, init_param does not exist!: {init_param}")
+ # fp16
+ if kwargs.get("fp16", False):
+ model.to(torch.float16)
return model, kwargs
def __call__(self, *args, **cfg):
--
Gitblit v1.9.1