ComfyUIManagerLogger 破坏 colorama: isatty() 硬编码为 False,且缺少 closed 属性,在 Windows 上从 print() 中移除 ANSI 彩色
作者: hwprinz创建于 2026年9月9日更新于 2026年9月9日
ComfyUIManagerLogger (prestartup_script.py) 替换 sys.stdout/sys.stderr 当文件日志打开时。截至 main (已验证 2026-09-09, 提交 f82970b7, 版本 3.41 - 下面的行号在当前 main 中是稳定的):
def isatty(self):在第 302 行硬编码为return False在第 303 行, 以及- 该类 (第 286 行) 在文件中没有定义 任何
closed属性。
colorama 的 AnsiToWin32.__init__ 会检查流:
have_tty = not self.stream.closed and self.stream.isatty()
...
if strip is None:
…内容来源: Comfy-Org/ComfyUI-Manager