jina-ai / discoart

🪩 Create Disco Diffusion artworks in one line
Other
3.84k stars 249 forks source link

Render progress is printed to STDERR #118

Closed zhl146 closed 2 years ago

zhl146 commented 2 years ago

I am trying to parse the render progress that looks like this: 8%|▊ | 19/250 [01:16<15:30, 4.03s/it] but it looks like it's output to stderr instead of stdout.

I can't find the code that prints this, would it be possible to change it so that it prints to stdout?

Thanks!

hanxiao commented 2 years ago

hmm, could you help me understand your env? are you using discoart as a python library, in notebook, in docker, or in serving?

zhl146 commented 2 years ago

I'm actually spawning a new thread for each create I make. The thread provides me an event stream for stderr and stdout separately, but I am finding that most of the useful messages go to stderr. I think this is a python default? https://deepumohan.com/tech/python-stdin-stderr-logging/

It would be nice if only errors went to stderr, as it would make deciding what is an error and what is info easier without having to parse the string.

hanxiao commented 2 years ago

close as #137