From 82aaff9d707ab14d898e98db8a2092a292b6e58c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 26 Jun 2025 07:59:51 -0400 Subject: [PATCH] gallery trace file fetch Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 2 +- modules/api/gallery.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 651847e83..ec8698873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for SD.Next -## Update for 2025-06-25 +## Update for 2025-06-26 - **Changes** - Add [JoyCaption Beta](https://huggingface.co/fancyfeast/llama-joycaption-beta-one-hf-llava) support (in addition to existing JoyCaption Alpha) diff --git a/modules/api/gallery.py b/modules/api/gallery.py index e1add81af..6510cd673 100644 --- a/modules/api/gallery.py +++ b/modules/api/gallery.py @@ -6,7 +6,7 @@ from typing import List, Union from urllib.parse import quote, unquote from fastapi import FastAPI from fastapi.responses import JSONResponse -from starlette.websockets import WebSocket, WebSocketState, WebSocketDisconnect +from starlette.websockets import WebSocket, WebSocketState from pydantic import BaseModel, Field # pylint: disable=no-name-in-module from PIL import Image from modules import shared, images, files_cache @@ -196,6 +196,6 @@ def register_api(app: FastAPI): # register api await manager.send(ws, '#END#') t1 = time.time() shared.log.debug(f'Gallery: type=ws folder="{folder}" files={numFiles} time={t1-t0:.3f}') - except WebSocketDisconnect: - debug('Browser WS unexpected disconnect') + except Exception as e: + debug(f'Browser WS error: {e}') manager.disconnect(ws)