Skip to content

Commit

Permalink
Merge pull request #652 from DiligentCatCat/main
Browse files Browse the repository at this point in the history
feat: use the closest model if model is not found
  • Loading branch information
Mikubill authored Mar 23, 2023
2 parents 2f0e673 + b8fdfb1 commit 241c05f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ def load_control_model(self, p, unet, model, lowvram):
def build_control_model(self, p, unet, model, lowvram):

model_path = global_state.cn_models.get(model, None)
if model_path is None:
model = find_closest_lora_model_name(model)
model_path = global_state.cn_models.get(model, None)

if model_path is None:
raise RuntimeError(f"model not found: {model}")

Expand Down

0 comments on commit 241c05f

Please sign in to comment.