From 811f1bc3521c02e655392e5185ac09745e160452 Mon Sep 17 00:00:00 2001 From: Hayden <48267247+hayden-fr@users.noreply.github.com> Date: Fri, 14 Mar 2025 17:02:54 +0800 Subject: [PATCH] Support optional in py3.9 (#165) * fix: support optional in py3.9 * prepare release 2.5.4 --- py/utils.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py/utils.py b/py/utils.py index 5114b17..c5bdd90 100644 --- a/py/utils.py +++ b/py/utils.py @@ -14,7 +14,7 @@ import comfy.utils import folder_paths from aiohttp import web -from typing import Any +from typing import Any, Optional from . import config @@ -308,7 +308,7 @@ def remove_model_preview_image(model_path: str): 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] preview_path = f"{basename}.webp" # Download image file if it is url diff --git a/pyproject.toml b/pyproject.toml index cffae8a..b575711 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-model-manager" description = "Manage models: browsing, download and delete." -version = "2.5.3" +version = "2.5.4" license = { file = "LICENSE" } dependencies = ["markdownify"]