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():