Closed NeedsMoar closed 10 months ago
Can you share your pip list
output?(Maybe as file attachment...)
Here you go. I just noticed the requirements.txt doesn't specify a version for aiohttp and mine just stayed on 3.8.4 but .github\workflows\windows_release_nightly_pytorch.yml lists aiohttp==3.8.5, if this makes any difference. I updated through the ComfyUI manager module instead of git pull this time which (I think?) handles running the requiements again. It seems like pip tries to pull as little as possible from the requirements list as long as any strict minimum version requirements are met, anyway.
Mostly it's winsock and access logs, but there's a ton of spam because custom nodes all have their own JS files and stylesheets. Just mousing over the graph caused multiple reloads of JS / CSS for some reason, so it's not very reasonable to display INFO level stuff in the shell even in verbose mode. The main issue being that it buries the custom node loading messages, and those need to be gone over every time I pull a new revision of Comfy or the larger node sets to make sure something that hasn't been updated in a while isn't broken since some of them try to modify built-in nodes without mentioning it and screw up the entire process. Previously they were the last thing visible before some spam from mtb so I could just switch to the cmd window and look for load fail messages. Logging it to file could be reasonable if somebody was actually insane enough to run a public facing python web server and needed to keep everything for analysis.
The normal Windows way of doing this would be to create a category in event viewer for the web server but leave it disabled unless the user subscribes to that category of events because they need them. Most use-cases won't because a localhost connection failure requires that the entire TCP/IP stack be intentionally corrupted, which can be done if you really want to, but in that case Windows will stop working correctly too.
A very small portion of a run in which I didn't actually do anything except switch browser tabs looks like this right up until I killed it:
I was able to do a quick hack to drop the aiohttp debug levels when the command line option is set by modifying server.py's start method:
The aiohttp page has suggestions on how to do this that are probably more correct, but the spammiest one (access) needs to be set to a custom logger in the run_app call and if you're going to do that you might as well just use the one with the same naming convention and set it wherever you feel like, IMO. The websockets ones should probably be disabled when the command line flag is used too, but there aren't very many of them.
Note that I never saw anything from web_logger, server_logger, client_logger, or ws_logger, but I didn't feel like tracking this down again and I'll forget in a day.
The best option would be globally changing Logger output level for everything to avoid some other library flooding the terminal in a month, but since python somehow managed to create an inline documentation format that seems to contain more formatting than the actual docs it generates on their site and nothing in the source file was immediately obvious (nor was I sure that the web server library would actually consistently use the Logger for output or not reset log levels somewhere at that point) I didn't feel like hunting through it further.