No silent fail if benchmark file is missing

This commit is contained in:
Rob Ballantyne
2025-10-23 13:41:03 +01:00
parent ec25dda3ad
commit 92a04bd7af
+4 -2
View File
@@ -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: