fix model download and autodetection bugs

- Corrected error that caused --full-precision argument to be ignored
  when models downloaded using the --yes argument.

- Improved autodetection of v1 inpainting files; no longer relies on the
  file having 'inpaint' in the name.
This commit is contained in:
Lincoln Stein
2023-02-16 21:37:50 -05:00
parent 5d617ce63d
commit f3f4c68acc
3 changed files with 31 additions and 18 deletions

View File

@ -368,8 +368,11 @@ def process_and_execute(app: npyscreen.NPSAppManaged):
# --------------------------------------------------------
def select_and_download_models(opt: Namespace):
if opt.default_only:
models_to_download = default_dataset()
install_requested_models(models_to_download)
models_to_install = default_dataset()
install_requested_models(
install_initial_models = models_to_install,
precision = 'float32' if opt.full_precision else choose_precision(torch.device(choose_torch_device())),
)
else:
installApp = AddModelApplication()
installApp.opt = opt