aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-18 23:52:01 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-09-18 23:52:01 +0300
commit7ae3dc286623771c2925d8d91dbca736920757e8 (patch)
treee7812f2169a79da1a3f9dc5e727b2f64873117d8 /modules/sd_models.py
parent2430fc20f10715b93a27638c21f83b2d3fa97398 (diff)
display a more informative message when a checkpoint is not found
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 4bd70fc5..dc81b0dc 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -76,8 +76,11 @@ def select_checkpoint():
return checkpoint_info
if len(checkpoints_list) == 0:
- print(f"Checkpoint {model_checkpoint} not found and no other checkpoints found", file=sys.stderr)
- return None
+ print(f"No checkpoints found. When searching for checkpoints, looked at:", file=sys.stderr)
+ print(f" - file {os.path.abspath(shared.cmd_opts.ckpt)}", file=sys.stderr)
+ print(f" - directory {os.path.abspath(shared.cmd_opts.ckpt_dir)}", file=sys.stderr)
+ print(f"Can't run without a checkpoint. Find and place a .ckpt file into any of those locations. The program will exit.", file=sys.stderr)
+ exit(1)
checkpoint_info = next(iter(checkpoints_list.values()))
if model_checkpoint is not None: