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(
|
||||
model_class,
|
||||
repo_id,
|
||||
cache_subdir="diffusers",
|
||||
safety_checker=None,
|
||||
**extra_args,
|
||||
)
|
||||
|
@ -955,7 +955,9 @@ class ModelManager(object):
|
||||
continue
|
||||
print(f"** {source} => {dest}")
|
||||
if source.exists():
|
||||
if dest.exists():
|
||||
if dest.is_symlink():
|
||||
print(f"** Found symlink at {dest.name}. Not migrating.")
|
||||
elif dest.exists():
|
||||
rmtree(source)
|
||||
else:
|
||||
move(source, dest)
|
||||
|
Loading…
Reference in New Issue
Block a user