diff --git a/nodes.py b/nodes.py index 25ea4db8..8aca2533 100644 --- a/nodes.py +++ b/nodes.py @@ -255,8 +255,8 @@ class LorasEndpoint: local_metadata['base_model'] = civitai_metadata.get('baseModel') # 4. 下载预览图 - # Check if existing preview is valid - if not local_metadata.get('preview_url') or not os.path.join(self.loras_root, local_metadata['preview_url'].replace('/', os.sep)): + # Check if existing preview is valid and the file exists + if not local_metadata.get('preview_url') or not os.path.exists(os.path.join(self.loras_root, local_metadata['preview_url'].replace('/', os.sep))): first_preview = next((img for img in civitai_metadata.get('images', [])), None) if first_preview: diff --git a/pyproject.toml b/pyproject.toml index e9765b71..f0e5301e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-lora-manager" description = "LoRA Manager for ComfyUI - An extension for managing LoRA models with previews and metadata integration." -version = "0.5.1" +version = "0.5.2" license = {file = "LICENSE"} dependencies = ["aiohttp", "jinja2", "safetensors"]