diff --git a/workers/comfyui-json/data_types.py b/workers/comfyui-json/data_types.py index d4cb7c6..1af1f8b 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 @@ -41,9 +44,10 @@ class ComfyWorkflowData(ApiPayload): ) except (json.JSONDecodeError, IOError): # JSON is malformed or file can't be read, fall through to default - pass + log.error(f"Failed to benchmark using {benchmark_file}") # Fallback: read prompts and construct payload + log.info("Using fallback method for benchmarking") with open("workers/comfyui-json/misc/test_prompts.txt", "r") as f: test_prompts = f.readlines()