mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix checkpoint VAE handling in migrate script
This commit is contained in:
parent
9f58ed35cf
commit
56f4712814
@ -293,6 +293,7 @@ class MigrateTo3(object):
|
|||||||
elif repo_id := vae.get('repo_id'):
|
elif repo_id := vae.get('repo_id'):
|
||||||
if repo_id=='stabilityai/sd-vae-ft-mse': # this guy is already downloaded
|
if repo_id=='stabilityai/sd-vae-ft-mse': # this guy is already downloaded
|
||||||
vae_path = 'models/core/convert/sd-vae-ft-mse'
|
vae_path = 'models/core/convert/sd-vae-ft-mse'
|
||||||
|
return vae_path
|
||||||
else:
|
else:
|
||||||
vae_path = self._download_vae(repo_id, vae.get('subfolder'))
|
vae_path = self._download_vae(repo_id, vae.get('subfolder'))
|
||||||
|
|
||||||
@ -305,7 +306,10 @@ class MigrateTo3(object):
|
|||||||
info = ModelProbe().heuristic_probe(vae_path)
|
info = ModelProbe().heuristic_probe(vae_path)
|
||||||
dest = self._model_probe_to_path(info) / vae_path.name
|
dest = self._model_probe_to_path(info) / vae_path.name
|
||||||
if not dest.exists():
|
if not dest.exists():
|
||||||
self.copy_dir(vae_path,dest)
|
if vae_path.is_dir():
|
||||||
|
self.copy_dir(vae_path,dest)
|
||||||
|
else:
|
||||||
|
self.copy_file(vae_path,dest)
|
||||||
vae_path = dest
|
vae_path = dest
|
||||||
|
|
||||||
if vae_path.is_relative_to(self.dest_models):
|
if vae_path.is_relative_to(self.dest_models):
|
||||||
|
Loading…
Reference in New Issue
Block a user