diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-04-29 13:10:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 13:10:16 +0000 |
commit | 725a3849d2761d40808899e9b1bcf594dd33109d (patch) | |
tree | 657962e52bbc50e3bd51ea292e616c2372501d58 /modules/interrogate.py | |
parent | c84118d70d7c3dd2f741f9e89b9a8a4643f27f98 (diff) | |
parent | 8863b31d83b527d041ca45e23b9af99e2346081a (diff) | |
download | stable-diffusion-webui-gfx803-725a3849d2761d40808899e9b1bcf594dd33109d.tar.gz stable-diffusion-webui-gfx803-725a3849d2761d40808899e9b1bcf594dd33109d.tar.bz2 stable-diffusion-webui-gfx803-725a3849d2761d40808899e9b1bcf594dd33109d.zip |
Merge branch 'dev' into pr/xyz-sort-001
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:
|