diff options
author | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-03 07:21:50 +0000 |
---|---|---|
committer | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-03 07:21:50 +0000 |
commit | f08ae961157d33051b5cd09ba5c77b779096ef69 (patch) | |
tree | 038e0f511d51816c0a971d6093da0420b5677ae0 /modules/interrogate.py | |
parent | dff60e2e74964a8b02b75ecd8cf8007ef67a9712 (diff) | |
parent | 335428c2c8139dfe07ba096a6defa75036660244 (diff) | |
download | stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.gz stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.bz2 stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.zip |
resolve merge conflicts and swap to dev branch for now
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:
|