From ffe26e85718b54796142312464fdc3ed4f0b4f6e Mon Sep 17 00:00:00 2001 From: Jacob Ferrari Date: Tue, 11 Feb 2025 02:14:27 +0000 Subject: [PATCH 1/2] Fix CLIP vision model URLs and improve download error handling - Update CLIP vision model URLs for IPAdapter and DynamiCrafter - Improve error handling for model downloads with clearer error messages - Add changelog entry for v1.2.8 --- README.md | 7 ++++++- py/config.py | 6 +++--- py/libs/utils.py | 12 +++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 34cae5b..3334dd3 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,11 @@ Double-click install.bat to install the required dependencies ## 📜 Changelog +**v1.2.8** + +- Fix CLIP vision model download URLs for IPAdapter and DynamiCrafter +- Improve error handling for model downloads with clearer error messages and better handling of download failures + **v1.2.7** - Optimize display of the node maps @@ -486,4 +491,4 @@ If my custom nodes has added value to your day, consider indulging in a coffee t My gratitude extends to the generous souls who bestow a star. Your support is much appreciated! -[![Stargazers repo roster for @yolain/ComfyUI-Easy-Use](https://reporoster.com/stars/yolain/ComfyUI-Easy-Use)](https://github.com/yolain/ComfyUI-Easy-Use/stargazers) \ No newline at end of file +[![Stargazers repo roster for @yolain/ComfyUI-Easy-Use](https://reporoster.com/stars/yolain/ComfyUI-Easy-Use)](https://github.com/yolain/ComfyUI-Easy-Use/stargazers) diff --git a/py/config.py b/py/config.py index c80e099..6788d86 100644 --- a/py/config.py +++ b/py/config.py @@ -336,7 +336,7 @@ IPADAPTER_CLIPVISION_MODELS = { "model_url": "https://huggingface.co/openai/clip-vit-large-patch14-336/resolve/main/pytorch_model.bin" }, "clip-vit-h-14-laion2B-s32B-b79K":{ - "model_url": "https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/resolve/main/open_clip_pytorch_model.safetensors" + "model_url": "https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/resolve/main/open_clip_model.safetensors" }, "sigclip_vision_patch14_384":{ "model_url": "https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_patch14_384.safetensors" @@ -350,7 +350,7 @@ DYNAMICRAFTER_MODELS = { "model_url": "https://huggingface.co/ExponentialML/DynamiCrafterUNet/resolve/main/dynamicrafter_unet_512.safetensors", "vae_url": "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors", "clip_url": "https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/text_encoder/model.safetensors", - "clip_vision_url": "https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/resolve/main/open_clip_pytorch_model.safetensors", + "clip_vision_url": "https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/resolve/main/open_clip_model.safetensors", }, "dynamicrafter_unet_512_interp (2.98GB)": { "model_url": "https://huggingface.co/ExponentialML/DynamiCrafterUNet/resolve/main/dynamicrafter_unet_512_interp.safetensors" @@ -395,4 +395,4 @@ PROMPT_TEMPLATE = { "nsfw": ["nude", "breast", "small breast", "middle breast", "large breast", "nipples", "clothes lift", "pussy juice trail", "pussy juice puddle", "small testicles", "medium testicles", "large testicles", "disembodied penis", "cum on body", "cum inside", "cum outside", "fingering", "handjob", "fellatio", "licking penis", "paizuri", "doggystyle", "cowgirl", "reversed cowgirl", "piledriver", "suspended congress", "full nelson",], } -NEW_SCHEDULERS = ['align_your_steps', 'gits'] \ No newline at end of file +NEW_SCHEDULERS = ['align_your_steps', 'gits'] diff --git a/py/libs/utils.py b/py/libs/utils.py index beb96be..122067e 100644 --- a/py/libs/utils.py +++ b/py/libs/utils.py @@ -82,6 +82,7 @@ def compare_revision(num): if not comfy_ui_revision: comfy_ui_revision = get_comfyui_revision() return True if comfy_ui_revision == 'Unknown' or int(comfy_ui_revision) >= num else False + def find_tags(string: str, sep="/") -> list[str]: """ find tags from string use the sep for split @@ -217,14 +218,15 @@ def get_local_filepath(url, dirname, local_file_name=None): except Exception as e: use_mirror = True url = url.replace('huggingface.co', 'hf-mirror.com') - print(f'无法从huggingface下载,正在尝试从 {url} 下载...') - PromptServer.instance.send_sync("easyuse-toast", {'content': f'无法连接huggingface,正在尝试从 {url} 下载...', 'duration': 10000}) + print(f'Unable to download from huggingface, trying mirror: {url}') + PromptServer.instance.send_sync("easyuse-toast", {'content': f'Unable to connect to huggingface, trying mirror: {url}', 'duration': 10000}) try: download_url_to_file(url, destination) except Exception as err: + error_msg = str(err.args[0]) if err.args else str(err) PromptServer.instance.send_sync("easyuse-toast", - {'content': f'无法从 {url} 下载模型', 'type':'error'}) - raise Exception(f'无法从 {url} 下载,错误信息:{str(err.args[0])}') + {'content': f'Unable to download model from {url}', 'type':'error'}) + raise Exception(f'Download failed. Original URL and mirror both failed.\nError: {error_msg}') return destination def to_lora_patch_dict(state_dict: dict) -> dict: @@ -277,4 +279,4 @@ def getMetadata(filepath): def cleanGPUUsedForce(): gc.collect() mm.unload_all_models() - mm.soft_empty_cache() \ No newline at end of file + mm.soft_empty_cache() From fa73da5a0069166213fa1ba104ba1666c34c0964 Mon Sep 17 00:00:00 2001 From: newideas99 Date: Mon, 10 Feb 2025 22:21:55 -0500 Subject: [PATCH 2/2] Update version to 1.2.8 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index bac8b1d..8538d1d 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.2.7" +__version__ = "1.2.8" import yaml import os