Support optional in py3.9 (#165)

* fix: support optional in py3.9

* prepare release 2.5.4
This commit is contained in:
Hayden
2025-03-14 17:02:54 +08:00
committed by GitHub
parent 5342b7ec92
commit 811f1bc352
2 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ import comfy.utils
import folder_paths import folder_paths
from aiohttp import web from aiohttp import web
from typing import Any from typing import Any, Optional
from . import config from . import config
@@ -308,7 +308,7 @@ def remove_model_preview_image(model_path: str):
os.remove(preview_path) os.remove(preview_path)
def save_model_preview_image(model_path: str, image_file_or_url: Any, platform: str | None = None): def save_model_preview_image(model_path: str, image_file_or_url: Any, platform: Optional[str] = None):
basename = os.path.splitext(model_path)[0] basename = os.path.splitext(model_path)[0]
preview_path = f"{basename}.webp" preview_path = f"{basename}.webp"
# Download image file if it is url # Download image file if it is url

View File

@@ -1,7 +1,7 @@
[project] [project]
name = "comfyui-model-manager" name = "comfyui-model-manager"
description = "Manage models: browsing, download and delete." description = "Manage models: browsing, download and delete."
version = "2.5.3" version = "2.5.4"
license = { file = "LICENSE" } license = { file = "LICENSE" }
dependencies = ["markdownify"] dependencies = ["markdownify"]