diff --git a/scripts/mbw/ui_mbw.py b/scripts/mbw/ui_mbw.py index 5623cb5..2b5dcb7 100644 --- a/scripts/mbw/ui_mbw.py +++ b/scripts/mbw/ui_mbw.py @@ -1,5 +1,6 @@ import gradio as gr import os +import re from modules import sd_models, shared from tqdm import tqdm @@ -145,8 +146,8 @@ def on_ui_tabs(): # save log to history.tsv sd_models.list_models() - model_O_info = sd_models.get_closet_checkpoint_match(model_O) - model_O_hash = "" if not model_O_info else model_O_info.hash + model_O_info = sd_models.get_closet_checkpoint_match(os.path.basename(_output)) + model_O_hash = "" if model_O_info is None else model_O_info.hash _names = presetWeights.find_names_by_weight(_weights) if _names and len(_names) > 0: weight_name = _names[0] diff --git a/scripts/mbw_each/ui_mbw_each.py b/scripts/mbw_each/ui_mbw_each.py index 7e93b54..b0a81f7 100644 --- a/scripts/mbw_each/ui_mbw_each.py +++ b/scripts/mbw_each/ui_mbw_each.py @@ -365,7 +365,8 @@ def on_ui_tabs(): # save log to history.tsv - model_O_info = sd_models.get_closet_checkpoint_match(model_O) + sd_models.list_models() + model_O_info = sd_models.get_closet_checkpoint_match(os.path.basename(output_file)) model_O_hash = "" if not model_O_info else model_O_info.hash _names = presetWeights.find_names_by_weight(weight_A) if _names and len(_names) > 0: