diff options
author | Beinsezii <39478211+Beinsezii@users.noreply.github.com> | 2023-06-27 22:29:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 22:29:47 +0000 |
commit | 9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38 (patch) | |
tree | d86d470db2289a31e589a7bd777a38784605313c /modules/codeformer_model.py | |
parent | 1d7c51fb9f757b5dcdc506f8fc003e6047151567 (diff) | |
parent | fab73f2e7d388ca99cdb3d5de7f36c0b9a1a3b1c (diff) | |
download | stable-diffusion-webui-gfx803-9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38.tar.gz stable-diffusion-webui-gfx803-9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38.tar.bz2 stable-diffusion-webui-gfx803-9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38.zip |
Merge branch 'AUTOMATIC1111:dev' into dev
Diffstat (limited to 'modules/codeformer_model.py')
-rw-r--r-- | modules/codeformer_model.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py index 4260b016..f293acf5 100644 --- a/modules/codeformer_model.py +++ b/modules/codeformer_model.py @@ -15,14 +15,11 @@ model_dir = "Codeformer" model_path = os.path.join(models_path, model_dir)
model_url = 'https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth'
-have_codeformer = False
codeformer = None
def setup_model(dirname):
- global model_path
- if not os.path.exists(model_path):
- os.makedirs(model_path)
+ os.makedirs(model_path, exist_ok=True)
path = modules.paths.paths.get("CodeFormer", None)
if path is None:
@@ -125,9 +122,6 @@ def setup_model(dirname): return restored_img
- global have_codeformer
- have_codeformer = True
-
global codeformer
codeformer = FaceRestorerCodeFormer(dirname)
shared.face_restorers.append(codeformer)
|