mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-08 07:49:59 +08:00
改用修饰器
This commit is contained in:
parent
6591e86df3
commit
7f8892d004
@ -569,7 +569,8 @@ class TTS:
|
||||
'''
|
||||
self.stop_flag = True
|
||||
|
||||
|
||||
# 使用装饰器
|
||||
@torch.no_grad()
|
||||
def run(self, inputs:dict):
|
||||
"""
|
||||
Text to speech inference.
|
||||
@ -600,8 +601,7 @@ class TTS:
|
||||
|
||||
|
||||
|
||||
# 直接给全体套一个torch.no_grad()
|
||||
with torch.no_grad():
|
||||
|
||||
########## variables initialization ###########
|
||||
self.stop_flag:bool = False
|
||||
text:str = inputs.get("text", "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user