Skip to content

Commit a1ed225

Browse files
committed
reenable line completion during CLI edit_model cmd
1 parent 3765ee9 commit a1ed225

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ldm/invoke/CLI.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,13 +838,15 @@ def edit_model(model_name: str, gen, opt, completer):
838838
print(f"\n>> Editing model {model_name} from configuration file {opt.conf}")
839839
new_name = _get_model_name(manager.list_models(), completer, model_name)
840840

841+
completer.complete_extensions(('.yaml','.ckpt','.safetensors','.pt'))
841842
for attribute in info.keys():
842843
if type(info[attribute]) != str:
843844
continue
844845
if attribute == "format":
845846
continue
846847
completer.set_line(info[attribute])
847848
info[attribute] = input(f"{attribute}: ") or info[attribute]
849+
completer.complete_extensions(None)
848850

849851
if info["format"] == "diffusers":
850852
vae = info.get("vae", dict(repo_id=None, path=None, subfolder=None))

0 commit comments

Comments
 (0)