mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
during migration do not overwrite symlinks
This commit is contained in:
parent
114018e3e6
commit
81dee04dc9
@ -270,7 +270,6 @@ def _download_diffusion_weights(
|
|||||||
path = download_from_hf(
|
path = download_from_hf(
|
||||||
model_class,
|
model_class,
|
||||||
repo_id,
|
repo_id,
|
||||||
cache_subdir="diffusers",
|
|
||||||
safety_checker=None,
|
safety_checker=None,
|
||||||
**extra_args,
|
**extra_args,
|
||||||
)
|
)
|
||||||
|
@ -955,7 +955,9 @@ class ModelManager(object):
|
|||||||
continue
|
continue
|
||||||
print(f"** {source} => {dest}")
|
print(f"** {source} => {dest}")
|
||||||
if source.exists():
|
if source.exists():
|
||||||
if dest.exists():
|
if dest.is_symlink():
|
||||||
|
print(f"** Found symlink at {dest.name}. Not migrating.")
|
||||||
|
elif dest.exists():
|
||||||
rmtree(source)
|
rmtree(source)
|
||||||
else:
|
else:
|
||||||
move(source, dest)
|
move(source, dest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user