mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 14:50:49 +08:00
Logger should check attributes on current sys.stdout, which may have been overwritten
This commit is contained in:
parent
c1b173e62a
commit
1488f2c59b
@ -57,6 +57,10 @@ def setup_logger(log_level: str = 'INFO', capacity: int = 300, use_stdout: bool
|
||||
if logs:
|
||||
return
|
||||
|
||||
# workaround for google collab
|
||||
if not hasattr(sys.stdout, "buffer") or not hasattr(sys.stdout, "encoding") or not hasattr(sys.stdout, "line_buffering"):
|
||||
return
|
||||
|
||||
# Override output streams and log to buffer
|
||||
logs = deque(maxlen=capacity)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user