mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
deal with non-directories in diffusers/
This commit is contained in:
parent
4e9e1b660d
commit
fc187f263e
@ -966,7 +966,10 @@ class ModelManager(object):
|
||||
if dest.is_symlink():
|
||||
print(f"** Found symlink at {dest.name}. Not migrating.")
|
||||
elif dest.exists():
|
||||
rmtree(source)
|
||||
if source.is_dir():
|
||||
rmtree(source)
|
||||
else:
|
||||
source.unlink()
|
||||
else:
|
||||
move(source, dest)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user