use closest match checkpoint method
This commit is contained in:
parent
642b7e333e
commit
f710ba11b9
1 changed files with 2 additions and 5 deletions
|
@ -45,11 +45,8 @@ def apply_sampler(p, x, xs):
|
||||||
|
|
||||||
|
|
||||||
def apply_checkpoint(p, x, xs):
|
def apply_checkpoint(p, x, xs):
|
||||||
applicable = [info for info in modules.sd_models.checkpoints_list.values() if x in info.title]
|
info = modules.sd_models.get_closet_checkpoint_match(x)
|
||||||
assert len(applicable) > 0, f'Checkpoint {x} for found'
|
assert info is not None, f'Checkpoint for {x} not found'
|
||||||
|
|
||||||
info = applicable[0]
|
|
||||||
|
|
||||||
modules.sd_models.reload_model_weights(shared.sd_model, info)
|
modules.sd_models.reload_model_weights(shared.sd_model, info)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue