olegchomp / TDComfyUI

TouchDesigner interface for ComfyUI
134 stars 9 forks source link

Sending JPEG instead of PNG? #6

Closed antoinecla closed 3 months ago

antoinecla commented 7 months ago

Hi,

Your tool is great, it works flawlessly ! I have been able to make it connect to ComfyUI on my own PC (RTX 3080) and on a remote server with a RTX 4090 (RunPod).

ComfyUI is two times faster on RunPod with the RTX 4090 (about 0.25s per image) compared to my PC. In spite of that, the frame rate remains about the same in TouchDesigner.

I am suspecting that the speed gain on the RunPod is canceled by the network speed.

It seems that the WebSocket Node in comfyui-tooling-nodes is sending the images in PNG format which is rather slow because of the image size. I would like to use the JPEG format but am unable to do so.

I have modified the code of comfyui-tooling-nodes to send JPEGs instead of PNGs but it does not to work. TouchDesigner output is black when using JPEG. Maybe your code is expecting PNGs only ?

Any suggestion how to make this work ?

Thanks again for your TD component. It is a great tool.

Antoine

olegchomp commented 7 months ago

Hi! You can find it in TDComfyUI/script2_callbacks1 and referencing to this issue https://github.com/Acly/comfyui-tooling-nodes/issues/2

Maybe something like: if event == 1 and format == 2: change to if event == 1: at line 20

antoinecla commented 7 months ago

Thanks for your speedy answer.

I will check that.