mirror of
https://github.com/2noise/ChatTTS.git
synced 2026-08-30 17:05:27 +08:00
fix(webui): disable torch.compile on Windows (#413)
This commit is contained in:
@@ -45,10 +45,10 @@ def reload_chat(coef: Optional[str]) -> str:
|
||||
gr.Warning("Ingore invalid DVAE coefficient.")
|
||||
coef = None
|
||||
if custom_path == None:
|
||||
ret = chat.load_models(coef=coef)
|
||||
ret = chat.load_models(coef=coef, compile=sys.platform != 'win32')
|
||||
else:
|
||||
logger.info('local model path: %s', custom_path)
|
||||
ret = chat.load_models('custom', custom_path=custom_path, coef=coef)
|
||||
ret = chat.load_models('custom', custom_path=custom_path, coef=coef, compile=sys.platform != 'win32')
|
||||
if not ret:
|
||||
raise gr.Error("Unable to load model.")
|
||||
gr.Info("Reload succeess.")
|
||||
|
||||
@@ -104,10 +104,10 @@ def main():
|
||||
global chat, custom_path
|
||||
|
||||
if args.custom_path == None:
|
||||
ret = chat.load_models()
|
||||
ret = chat.load_models(compile=sys.platform != 'win32')
|
||||
else:
|
||||
logger.info('local model path: %s', args.custom_path)
|
||||
ret = chat.load_models('custom', custom_path=args.custom_path)
|
||||
ret = chat.load_models('custom', custom_path=args.custom_path, compile=sys.platform != 'win32')
|
||||
|
||||
if ret:
|
||||
logger.info("Models loaded successfully.")
|
||||
|
||||
Reference in New Issue
Block a user