mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix bug that prevented converted files from being written into models.yaml`
This commit is contained in:
@ -725,7 +725,7 @@ def convert_model(model_name_or_path: Union[Path, str], gen, opt, completer) ->
|
|||||||
vae_repo = dict(repo_id=vae_repo)
|
vae_repo = dict(repo_id=vae_repo)
|
||||||
else:
|
else:
|
||||||
vae_repo = None
|
vae_repo = None
|
||||||
model_name = gen.model_manager.convert_and_import(
|
model_name = manager.convert_and_import(
|
||||||
ckpt_path,
|
ckpt_path,
|
||||||
diffusers_path=Path(
|
diffusers_path=Path(
|
||||||
Globals.root, "models", Globals.converted_ckpts_dir, model_name_or_path
|
Globals.root, "models", Globals.converted_ckpts_dir, model_name_or_path
|
||||||
@ -741,6 +741,8 @@ def convert_model(model_name_or_path: Union[Path, str], gen, opt, completer) ->
|
|||||||
if not model_name:
|
if not model_name:
|
||||||
print("** Conversion failed. Aborting.")
|
print("** Conversion failed. Aborting.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
manager.commit(opt.conf)
|
||||||
if click.confirm(f"Delete the original .ckpt file at {ckpt_path}?", default=False):
|
if click.confirm(f"Delete the original .ckpt file at {ckpt_path}?", default=False):
|
||||||
ckpt_path.unlink(missing_ok=True)
|
ckpt_path.unlink(missing_ok=True)
|
||||||
print(f"{ckpt_path} deleted")
|
print(f"{ckpt_path} deleted")
|
||||||
|
Reference in New Issue
Block a user