Unverified Commit eba60a42 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #5627 from deanpress/patch-1

fix: fallback model_checkpoint if it's empty
parents adab48cb 59c65114
...@@ -111,6 +111,10 @@ def model_hash(filename): ...@@ -111,6 +111,10 @@ def model_hash(filename):
def select_checkpoint(): def select_checkpoint():
model_checkpoint = shared.opts.sd_model_checkpoint model_checkpoint = shared.opts.sd_model_checkpoint
if len(model_checkpoint) == 0:
model_checkpoint = shared.default_sd_model_file
checkpoint_info = checkpoints_list.get(model_checkpoint, None) checkpoint_info = checkpoints_list.get(model_checkpoint, None)
if checkpoint_info is not None: if checkpoint_info is not None:
return checkpoint_info return checkpoint_info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment