From fce874ee7a7cf4e7c3a9452567513ff2e4ab8323 Mon Sep 17 00:00:00 2001 From: Peter Schroedl Date: Fri, 7 Mar 2025 23:18:23 +0000 Subject: [PATCH 1/2] set logging level for comfy package to WARN --- runner/app/live/pipelines/comfyui.py | 2 +- runner/app/live/streamer/process.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/runner/app/live/pipelines/comfyui.py b/runner/app/live/pipelines/comfyui.py index 8673fd6f..7f4152d3 100644 --- a/runner/app/live/pipelines/comfyui.py +++ b/runner/app/live/pipelines/comfyui.py @@ -267,7 +267,7 @@ def __init__(self, **params): super().__init__(**params) comfy_ui_workspace = os.getenv(COMFY_UI_WORKSPACE_ENV) - self.client = ComfyStreamClient(cwd=comfy_ui_workspace) + self.client = ComfyStreamClient(cwd=comfy_ui_workspace, verbose="WARNING") self.params: ComfyUIParams self.update_params(**params) diff --git a/runner/app/live/streamer/process.py b/runner/app/live/streamer/process.py index 7fec1629..ca2ff148 100644 --- a/runner/app/live/streamer/process.py +++ b/runner/app/live/streamer/process.py @@ -111,6 +111,12 @@ def process_loop(self): if torch.cuda.is_available(): os.environ["CUDA_VISIBLE_DEVICES"] = str(torch.cuda.current_device()) + # ComfystreamClient/embeddedComfyClient is not respecting config parameters + # such as verbose='WARNING', logging_level='WARNING' + # Setting here to override and supress excessive INFO logging + # ( load_gpu_models is calling logging.info() for every frame ) + logging.getLogger("comfy").setLevel(logging.WARNING) + def report_error(error_msg: str): error_event = { "message": error_msg, From ca9a6f8eb8381098fe9db1ecc4fcccf33c0444a8 Mon Sep 17 00:00:00 2001 From: Peter Schroedl Date: Fri, 7 Mar 2025 23:25:19 +0000 Subject: [PATCH 2/2] revert change to ComfystreamClient instantiation --- runner/app/live/pipelines/comfyui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/app/live/pipelines/comfyui.py b/runner/app/live/pipelines/comfyui.py index 7f4152d3..8673fd6f 100644 --- a/runner/app/live/pipelines/comfyui.py +++ b/runner/app/live/pipelines/comfyui.py @@ -267,7 +267,7 @@ def __init__(self, **params): super().__init__(**params) comfy_ui_workspace = os.getenv(COMFY_UI_WORKSPACE_ENV) - self.client = ComfyStreamClient(cwd=comfy_ui_workspace, verbose="WARNING") + self.client = ComfyStreamClient(cwd=comfy_ui_workspace) self.params: ComfyUIParams self.update_params(**params)