Revert "Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram"

This reverts commit e0e70c9222, reversing
changes made to 0b184913b9.
This commit is contained in:
blessedcoolant
2023-03-06 14:29:39 +13:00
parent e0e70c9222
commit e537b5d8e1
327 changed files with 6253 additions and 6631 deletions

View File

@ -941,7 +941,7 @@ class ModelManager(object):
"openai/clip-vit-large-patch14/models--openai--clip-vit-large-patch14"
),
]
legacy_locations.extend(list(global_cache_dir("diffusers").glob('*')))
legacy_locations.extend(list(Path(models_dir,"diffusers").glob('*')))
legacy_layout = False
for model in legacy_locations:
@ -950,17 +950,9 @@ class ModelManager(object):
return
print(
"""
>> ALERT:
>> The location of your previously-installed diffusers models needs to move from
>> invokeai/models/diffusers to invokeai/models/hub due to a change introduced by
>> diffusers version 0.14. InvokeAI will now move all models from the "diffusers" directory
>> into "hub" and then remove the diffusers directory. This is a quick, safe, one-time
>> operation. However if you have customized either of these directories and need to
>> make adjustments, please press ctrl-C now to abort and relaunch InvokeAI when you are ready.
>> Otherwise press <enter> to continue."""
"** Old model directory layout (< v3.0) detected. Reorganizing."
)
input('continue> ')
print("** This is a quick one-time operation.")
# transformer files get moved into the hub directory
if cls._is_huggingface_hub_directory_present():
@ -979,10 +971,7 @@ class ModelManager(object):
if dest.is_symlink():
print(f"** Found symlink at {dest.name}. Not migrating.")
elif dest.exists():
if source.is_dir():
rmtree(source)
else:
source.unlink()
rmtree(source)
else:
move(source, dest)