From b12e33891c0a7d9c71ed743398a78eb135236894 Mon Sep 17 00:00:00 2001 From: Ftps <63702646+Tps-F@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:11:13 +0900 Subject: [PATCH] fix open (#200) --- config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 4acce95..1082d2a 100644 --- a/config.py +++ b/config.py @@ -62,7 +62,7 @@ class Config: print("16系显卡强制单精度") self.is_half = False for config_file in ["32k.json", "40k.json", "48k.json"]: - with open(f"configs/{config_file}", "a") as f: + with open(f"configs/{config_file}", "r+") as f: strr = f.read().replace("true", "false") f.write(strr) self.gpu_mem = int( @@ -73,7 +73,7 @@ class Config: + 0.4 ) if self.gpu_mem <= 4: - with open("trainset_preprocess_pipeline_print.py", "a") as f: + with open("trainset_preprocess_pipeline_print.py", "r+") as f: strr = f.read().replace("3.7", "3.0") f.write(strr) elif torch.backends.mps.is_available():