chore: make lint happy

This commit is contained in:
源文雨
2025-11-27 17:26:36 +08:00
parent 31ed623a27
commit 66cd749cc5
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ class Chat:
use_flash_attn=False,
use_vllm=False,
experimental: bool = False,
enable_cache=False,
enable_cache=True,
) -> bool:
download_path = self.download_models(source, force_redownload, custom_path)
if download_path is None:
@@ -289,7 +289,7 @@ class Chat:
use_flash_attn=False,
use_vllm=False,
experimental: bool = False,
enable_cache = False,
enable_cache = True,
):
if device is None:
device = select_device(experimental=experimental)
+1 -1
View File
@@ -28,7 +28,7 @@ class GPT(nn.Module):
device=torch.device("cpu"),
device_gpt=torch.device("cpu"),
logger=logging.getLogger(__name__),
enable_cache=False,
enable_cache=True,
):
super().__init__()
+1 -1
View File
@@ -62,7 +62,7 @@ def on_audio_seed_change(audio_seed_input):
return rand_spk
def load_chat(cust_path: Optional[str], coef: Optional[str], enable_cache = False) -> bool:
def load_chat(cust_path: Optional[str], coef: Optional[str], enable_cache = True) -> bool:
if cust_path == None:
ret = chat.load(coef=coef, enable_cache=enable_cache)
else:
+2 -2
View File
@@ -261,12 +261,12 @@ def main():
parser.add_argument("--root_path", type=str, help="root path")
parser.add_argument("--custom_path", type=str, help="custom model path")
parser.add_argument("--coef", type=str, help="custom dvae coefficient")
parser.add_argument("--enable_cache", action="store_true", help="enable model cache")
parser.add_argument("--disable_cache", action="store_true", help="enable model cache")
args = parser.parse_args()
logger.info("loading ChatTTS model...")
if load_chat(args.custom_path, args.coef, args.enable_cache):
if load_chat(args.custom_path, args.coef, not args.disable_cache):
logger.info("Models loaded successfully.")
else:
logger.error("Models load failed.")