Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
b2030a24
Unverified
Commit
b2030a24
authored
May 28, 2024
by
Álvaro Somoza
Committed by
GitHub
May 28, 2024
Browse files
Fix object has no attribute 'flush' when using without a console (#8271)
fix
parent
67bef202
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/diffusers/utils/logging.py
src/diffusers/utils/logging.py
+3
-1
No files found.
src/diffusers/utils/logging.py
View file @
b2030a24
...
...
@@ -82,7 +82,9 @@ def _configure_library_root_logger() -> None:
# This library has already configured the library root logger.
return
_default_handler
=
logging
.
StreamHandler
()
# Set sys.stderr as stream.
_default_handler
.
flush
=
sys
.
stderr
.
flush
if
sys
.
stderr
:
# only if sys.stderr exists, e.g. when not using pythonw in windows
_default_handler
.
flush
=
sys
.
stderr
.
flush
# Apply our default configuration to the library root logger.
library_root_logger
=
_get_library_root_logger
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment