From e0ec5dee30c8195139dc3d438b2d0db76138340c Mon Sep 17 00:00:00 2001 From: Dijkstra Date: Thu, 16 Jan 2025 09:35:17 +0100 Subject: [PATCH 1/2] fix: no longer crash when internet is unavailable --- utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index bf16367..baa2254 100644 --- a/utils.py +++ b/utils.py @@ -83,8 +83,11 @@ def save_dict_to_json(data_dict, file_path): def get_model_version_info(hash_value): api_url = f"https://civitai.com/api/v1/model-versions/by-hash/{hash_value}" - response = requests.get(api_url) - + try: + response = requests.get(api_url) + except Exception as e: + print(f"[Lora-Auto-Trigger] {e}") + return None if response.status_code == 200: return response.json() else: From 8c18075e9f3149ccc0fd76e8949caab3470a708e Mon Sep 17 00:00:00 2001 From: Dijkstra Date: Thu, 16 Jan 2025 09:37:53 +0100 Subject: [PATCH 2/2] chore: update node version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2011a80..b4fa042 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-lora-auto-trigger-words" description = "The aim of these custom nodes is to get an easy access to the tags used to trigger a lora / lycoris. Extract the tags from civitai or from the safetensors metadatas when available." -version = "1.0.3" +version = "1.0.4" license = "MIT" [project.urls]