Merge pull request #657 from newideas99/fix-clip-vision-urls
Fix CLIP vision model URLs and improve download error handling
This commit is contained in:
@@ -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!
|
||||
|
||||
[](https://github.com/yolain/ComfyUI-Easy-Use/stargazers)
|
||||
[](https://github.com/yolain/ComfyUI-Easy-Use/stargazers)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
__version__ = "1.2.7"
|
||||
__version__ = "1.2.8"
|
||||
|
||||
import yaml
|
||||
import os
|
||||
|
||||
+3
-3
@@ -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']
|
||||
NEW_SCHEDULERS = ['align_your_steps', 'gits']
|
||||
|
||||
+7
-5
@@ -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()
|
||||
mm.soft_empty_cache()
|
||||
|
||||
Reference in New Issue
Block a user