diff --git a/javascript/civitai_helper.js b/javascript/civitai_helper.js index 5495255..5a484dd 100644 --- a/javascript/civitai_helper.js +++ b/javascript/civitai_helper.js @@ -338,7 +338,7 @@ onUiLoaded(() => { // get all extra network tabs let tab_prefix_list = ["txt2img", "img2img"]; - let model_type_list = ["textual_inversion", "hypernetworks", "checkpoints", "lora"]; + let model_type_list = ["textual_inversion", "hypernetworks", "checkpoints", "lora", "lycoris"]; let cardid_suffix = "cards"; //get init py msg @@ -450,6 +450,9 @@ onUiLoaded(() => { case "lora": active_extra_tab_type = "lora"; break; + case "lycoris": + active_extra_tab_type = "lycoris"; + break; } @@ -468,6 +471,9 @@ onUiLoaded(() => { case "lora": model_type = "lora"; break; + case "lycoris": + model_type = "lycoris"; + break; } if (!model_type) { diff --git a/scripts/ch_lib/civitai.py b/scripts/ch_lib/civitai.py index ab4af45..749072a 100644 --- a/scripts/ch_lib/civitai.py +++ b/scripts/ch_lib/civitai.py @@ -23,7 +23,7 @@ model_type_dict = { "TextualInversion": "ti", "Hypernetwork": "hyper", "LORA": "lora", - "LoCon": "lora", + "LoCon": "lycoris", } diff --git a/scripts/ch_lib/model.py b/scripts/ch_lib/model.py index 1cdc012..a8951e5 100644 --- a/scripts/ch_lib/model.py +++ b/scripts/ch_lib/model.py @@ -17,6 +17,7 @@ folders = { "hyper": os.path.join(root_path, "models", "hypernetworks"), "ckp": os.path.join(root_path, "models", "Stable-diffusion"), "lora": os.path.join(root_path, "models", "Lora"), + "lycoris": os.path.join(root_path, "models", "LyCORIS"), } exts = (".bin", ".pt", ".safetensors", ".ckpt") @@ -42,8 +43,8 @@ def get_custom_model_folder(): if shared.cmd_opts.lora_dir and os.path.isdir(shared.cmd_opts.lora_dir): folders["lora"] = shared.cmd_opts.lora_dir - - + if shared.cmd_opts.lyco_dir and os.path.isdir(shared.cmd_opts.lyco_dir): + folders["lycoris"] = shared.cmd_opts.lyco_dir # write model info to file diff --git a/scripts/civitai_helper.py b/scripts/civitai_helper.py index ad9e70a..47cd8c2 100644 --- a/scripts/civitai_helper.py +++ b/scripts/civitai_helper.py @@ -152,7 +152,7 @@ def on_ui_tabs(): with gr.Column(): gr.Markdown("### Check models' new version") with gr.Row(): - model_types_ckbg = gr.CheckboxGroup(choices=model_types, label="Model Types", value=["lora"]) + model_types_ckbg = gr.CheckboxGroup(choices=model_types, label="Model Types", value=["ti", "hyper", "ckp", "lora", "lycoris"]) check_models_new_version_btn = gr.Button(value="Check New Version from Civitai", variant="primary") check_models_new_version_log_md = gr.HTML("It takes time, just wait. Check console log for detail")