diff --git a/__init__.py b/__init__.py index c3b7f0f9..fd8b291f 100644 --- a/__init__.py +++ b/__init__.py @@ -19,7 +19,7 @@ from server import PromptServer from .glob import manager_core as core import cm_global -version = [2, 18, 4] +version = [2, 19] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') print(f"### Loading: ComfyUI-Manager ({version_str})") @@ -541,6 +541,12 @@ async def fetch_externalmodel_list(request): return web.json_response(json_obj, content_type='application/json') +@PromptServer.instance.routes.get("/snapshot/get_current") +async def get_snapshot_list(request): + json_obj = get_current_snapshot() + return web.json_response(json_obj, content_type='application/json') + + @PromptServer.instance.routes.get("/snapshot/getlist") async def get_snapshot_list(request): snapshots_directory = os.path.join(os.path.dirname(__file__), 'snapshots')