From 0b829dc4d4426f877debe0cc110fbfcdb7fdaa6e Mon Sep 17 00:00:00 2001 From: Silversith Date: Tue, 11 Apr 2023 10:09:34 +0200 Subject: [PATCH] Update server.py If outputdir doesn't exist, just create it --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index abeda9612..3ad340fa7 100644 --- a/server.py +++ b/server.py @@ -145,7 +145,7 @@ class PromptServer(): output_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output") if not os.path.exists(output_dir): - return web.Response(status=404) + os.mkdir(output_dir) images = [f for f in os.listdir(output_dir) if f.endswith('.png')] # Check the length of the images list