From 92a04bd7afc0b9d7bfb86ddb90d0b77641df53d4 Mon Sep 17 00:00:00 2001 From: Rob Ballantyne Date: Thu, 23 Oct 2025 13:41:03 +0100 Subject: [PATCH] No silent fail if benchmark file is missing --- workers/comfyui-json/data_types.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workers/comfyui-json/data_types.py b/workers/comfyui-json/data_types.py index d4cb7c6..578a48b 100644 --- a/workers/comfyui-json/data_types.py +++ b/workers/comfyui-json/data_types.py @@ -7,9 +7,12 @@ from functools import cache from math import ceil from pathlib import Path import json +import logging from lib.data_types import ApiPayload, JsonDataException +log = logging.getLogger(__file__) + def count_workload() -> float: # Always 100.0 where there is a single instance of ComfyUI handling requests # Results will indicate % or a job completed per second. Avoids sub 0.1 sec performance indication @@ -40,8 +43,7 @@ class ComfyWorkflowData(ApiPayload): } ) except (json.JSONDecodeError, IOError): - # JSON is malformed or file can't be read, fall through to default - pass + log.info(f"{benchmark_file} not found. Using fallback method") # Fallback: read prompts and construct payload with open("workers/comfyui-json/misc/test_prompts.txt", "r") as f: