From 9e7bb45ca9eb1333c125ebf4dfcaf812cac1ae10 Mon Sep 17 00:00:00 2001 From: vladmandic Date: Fri, 5 Jul 2024 01:10:32 +0000 Subject: [PATCH 1/4] =?UTF-8?q?Deploying=20to=20master=20from=20@=20vladma?= =?UTF-8?q?ndic/automatic@081c19fc122c6c8e60fcddfc37917e8107f65290=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 421e35f90..52853ad3a 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ check [ChangeLog](CHANGELOG.md) for when feature was first introduced as it will ### Sponsors
-Allan GrantBrent OzarMatthew Runoa.v.mantzarisRobert McCurdy +Allan GrantBrent OzarMatthew Runoa.v.mantzaris

From 4a033682d09f2c98a0112f705d0498a7df438a6e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 9 Jul 2024 23:28:33 -0400 Subject: [PATCH 2/4] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d56e113ba..cf176d6cf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -80,7 +80,7 @@ body: label: UI description: Which UI are you're using? options: - - None + - API - Standard - ModernUI default: 1 From a874b27e50a343ac55148756a0a80eafb3a7f87f Mon Sep 17 00:00:00 2001 From: vladmandic Date: Wed, 24 Jul 2024 20:16:33 +0000 Subject: [PATCH 3/4] =?UTF-8?q?Deploying=20to=20master=20from=20@=20vladma?= =?UTF-8?q?ndic/automatic@2ec6e9eec481223b8abe50cb5165d5fd9be2d086=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0ec2a07b..adaa712b6 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,7 @@ check [ChangeLog](CHANGELOG.md) for when feature was first introduced as it will ### Sponsors
-Allan GrantBrent OzarMatthew Runoa.v.mantzaris +Allan GrantBrent OzarMatthew Runoa.v.mantzaris

From 04f4757b88d13815ed05b1a606dfd9ca6616cf89 Mon Sep 17 00:00:00 2001 From: osanseviero Date: Tue, 13 Aug 2024 10:48:11 +0200 Subject: [PATCH 4/4] Update to new huggingface stuff --- cli/hf-search.py | 2 +- modules/modelloader.py | 2 +- modules/ui_models.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cli/hf-search.py b/cli/hf-search.py index 53c254d44..f69c215eb 100755 --- a/cli/hf-search.py +++ b/cli/hf-search.py @@ -14,5 +14,5 @@ if __name__ == "__main__": library=['diffusers'], ) res = hf_api.list_models(filter=model_filter, full=True, limit=50, sort="downloads", direction=-1) - models = [{ 'name': m.modelId, 'downloads': m.downloads, 'mtime': m.lastModified, 'url': f'https://huggingface.co/{m.modelId}', 'pipeline': m.pipeline_tag, 'tags': m.tags } for m in res] + models = [{ 'name': m.id, 'downloads': m.downloads, 'mtime': m.lastModified, 'url': f'https://huggingface.co/{m.id}', 'pipeline': m.pipeline_tag, 'tags': m.tags } for m in res] print(models) diff --git a/modules/modelloader.py b/modules/modelloader.py index 02db8b52f..02dbf5c45 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -308,7 +308,7 @@ def find_diffuser(name: str): models = list(hf_api.list_models(filter=hf_filter, full=True, limit=20, sort="downloads", direction=-1)) shared.log.debug(f'Searching diffusers models: {name} {len(models) > 0}') if len(models) > 0: - return models[0].modelId + return models[0].id return None diff --git a/modules/ui_models.py b/modules/ui_models.py index a5d3639bf..3ce877177 100644 --- a/modules/ui_models.py +++ b/modules/ui_models.py @@ -362,12 +362,11 @@ def create_ui(): def hf_search(keyword): import huggingface_hub as hf hf_api = hf.HfApi() - model_filter = hf.ModelFilter(model_name=keyword, library=['diffusers']) - models = hf_api.list_models(filter=model_filter, full=True, limit=50, sort="downloads", direction=-1) + models = hf_api.list_models(model_name=keyword, full=True, library="diffusers", limit=50, sort="downloads", direction=-1) data.clear() for model in models: tags = [t for t in model.tags if not t.startswith('diffusers') and not t.startswith('license') and not t.startswith('arxiv') and len(t) > 2] - data.append([model.modelId, model.pipeline_tag, tags, model.downloads, model.lastModified, f'https://huggingface.co/{model.modelId}']) + data.append([model.id, model.pipeline_tag, tags, model.downloads, model.lastModified, f'https://huggingface.co/{model.id}']) return data def hf_select(evt: gr.SelectData, data):