From a4138a89ee123f293477dffe4ab0f177ebb6ba7b Mon Sep 17 00:00:00 2001 From: Akhil Narayanan <20665294+akhilnarayanan1@users.noreply.github.com> Date: Wed, 7 Jan 2026 21:52:02 +0530 Subject: [PATCH] Ignore Windows stderr flush errors (#2462) --- comfyui_manager/prestartup_script.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/comfyui_manager/prestartup_script.py b/comfyui_manager/prestartup_script.py index 29ce42bb..3f3cbfe9 100644 --- a/comfyui_manager/prestartup_script.py +++ b/comfyui_manager/prestartup_script.py @@ -340,10 +340,13 @@ try: pass with std_log_lock: - if self.is_stdout: - original_stdout.flush() - else: - original_stderr.flush() + try: + if self.is_stdout: + original_stdout.flush() + else: + original_stderr.flush() + except (OSError, ValueError): + pass def close(self): self.flush()