diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-04-29 14:02:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 14:02:14 +0000 |
commit | 3894609b52cb21d8974387bf6bb4b734e3296b4a (patch) | |
tree | c17a740c559e6dfc7d86dcfad07675522d315037 /modules/interrogate.py | |
parent | 9a4e650800adc444c07a48572a958a71c2144c15 (diff) | |
parent | 17cce456133bf22c83cb379c0179e8b0daaa21e4 (diff) | |
download | stable-diffusion-webui-gfx803-3894609b52cb21d8974387bf6bb4b734e3296b4a.tar.gz stable-diffusion-webui-gfx803-3894609b52cb21d8974387bf6bb4b734e3296b4a.tar.bz2 stable-diffusion-webui-gfx803-3894609b52cb21d8974387bf6bb4b734e3296b4a.zip |
Merge branch 'dev' into master
Diffstat (limited to 'modules/interrogate.py')
-rw-r--r-- | modules/interrogate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/interrogate.py b/modules/interrogate.py index cbb80683..e1665708 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -32,7 +32,7 @@ def download_default_clip_interrogate_categories(content_dir): category_types = ["artists", "flavors", "mediums", "movements"]
try:
- os.makedirs(tmpdir)
+ os.makedirs(tmpdir, exist_ok=True)
for category_type in category_types:
torch.hub.download_url_to_file(f"https://raw.githubusercontent.com/pharmapsychotic/clip-interrogator/main/clip_interrogator/data/{category_type}.txt", os.path.join(tmpdir, f"{category_type}.txt"))
os.rename(tmpdir, content_dir)
@@ -41,7 +41,7 @@ def download_default_clip_interrogate_categories(content_dir): errors.display(e, "downloading default CLIP interrogate categories")
finally:
if os.path.exists(tmpdir):
- os.remove(tmpdir)
+ os.removedirs(tmpdir)
class InterrogateModels:
|