I spent a little time playing around with the configs and looking at the performance metrics on Runpod. A few findings:
Runpod is CPU bottlenecked. The main ComfyStream thread is running at 1300%. This significantly limits the possible FPS. I can only do 6FPS consistently. (On my local machine with a Ryzen 9700, I can get up to 24FPS). GPU is only 10-20% utilized at 6FPS.
Increasing the KSampler denoise steps to 3 significantly improved the output visual quality. It also increased GPU utilization to about 35%.
Increasing the CFG also improved output visual quality, although it needs to be coupled with increased denoise steps. It also increased GPU utilization. At 1.5 CFG / 3 denoise steps, GPU utilization is around 50% for 6fps.
This also points to the potential of StreamDiffusion. Moving to a multi-step batching workflow will likely significantly improve visual quality (separate from the temporal consistency improvement).
@ericxtang Thanks for sharing your findings! Have you already run a profiler on the workflow to pinpoint the cause of the high CPU usage, or would you like the research team to take a look?
To summarize your video, we currently have:
CPU is the bottleneck for FPS. It already as at it’s max on your machine.
Increasing denoising steps enhances quality but also increases GPU usage.
Increasing CFG improves output quality and further utilizes GPU resources.
@ericxtang I run the livepeer template but I cant get it to communicate with the comfystream ui. I have followed all guides, but I always get conflicting ports.
ComfyStream server started on port 8889 (PID: 5030)
Server status: {'running': True, 'port': 8889, 'host': 'localhost', 'pid': 5030, 'type': 'local'}
Traceback (most recent call last):
File "/app/ComfyUI/custom_nodes/comfystream/server/app.py", line 438, in <module>
web.run_app(app, host=args.host, port=int(args.port), print=force_print)
File "/workspace/miniconda3/envs/comfystream/lib/python3.11/site-packages/aiohttp/web.py", line 530, in run_app
loop.run_until_complete(main_task)
File "/workspace/miniconda3/envs/comfystream/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 8889): address already in use