From 6d14bc0a8ae45b70493333f2e5d2134a2e40bc7d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 11 Oct 2023 16:43:28 -0400 Subject: [PATCH] civit downloader extra types --- modules/ui_models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ui_models.py b/modules/ui_models.py index 1af489daa..817ec607d 100644 --- a/modules/ui_models.py +++ b/modules/ui_models.py @@ -245,8 +245,8 @@ def create_ui(): data = [] def civit_search_model(name, tag, model_type): - types = 'LORA' if model_type == 'LoRA' else 'Checkpoint' - url = f'https://civitai.com/api/v1/models?limit=25&types={types}&Sort=Newest' + # types = 'LORA' if model_type == 'LoRA' else 'Checkpoint' + url = 'https://civitai.com/api/v1/models?limit=25&&Sort=Newest' if name is not None and len(name) > 0: url += f'&query={name}' if tag is not None and len(tag) > 0: @@ -261,7 +261,7 @@ def create_ui(): data1 = [] for model in data: found = 0 - if model_type == 'LoRA' and model['type'] == 'LORA': + if model_type == 'LoRA' and model['type'] in ['LORA', 'LoCon']: found += 1 for variant in model['modelVersions']: if model_type == 'SD 1.5':