Very slow processing of the stage two "Dilate Video Mask" node - anyone else?

#1
by benuk01 - opened

Firstly - thanks to the LTX team for your sterling work. I'm really hoping that the new inpainting/outpainting IC Lora for LTX2.3 can rival Vace for Wan 2.1.

I'm currently testing the official workflow for use with the inpainting lora and the only thing that seems a bit "off" is that it will sit for a few minutes on the second stage "Dilate Video Mask" node. I don't think I'm doing anything too unusual. The video is a 9:16 format at 512 pixels on the shorter edge and I haven't actually set a dilation value (still set at 0). Within ComfyUI, this node doesn't actually generate info to the log so I can't even see exactly what errors may be occurring. The ComfyUI resource status bar doesn't show VRAM, CPU or RAM anywhere near the limits.

The video generation will eventually move to the next stage but the longest part of the entire generation process (for this 6 second clip) is when it sits on that node. I'm not sure if anyone else has seen this issue or if the LTX team are aware if it is, indeed, a wider issue.

If not needing the dilate, bypass the node. Sometimes setting 0 or defaults for nodes still does processing. It just does nothing and takes time to do that nothing... I dont know if this is the case but bypassing the node if not using dilate is probably easiest solution.

I'll try that. I think, in most cases I probably won't need mask dilation as it does seem to successfully cover the section of the video required already. One of my runs earlier, it sat on that node for over 18 minutes before moving on! I guess it's trying and failing to do something, then hits a retry limit and moves on (?). Hopefully no-one else has this issue - maybe just a quirk/conflict within my particular ComfyUI setup.

There are many nodes that do this. Mask erode and dilate are intensive processes... it looks at every pixel on every mask to do its work. 18min is ... a lot, its done on CPU not GPU i think so your cpu is the bottleneck. The size of your masks will effect this too. Large masks process times go up exponentially with size not linear. If using 1080p or bigger masks it will take ages. for long videos of 500+ frames it can be extreme. I tend to drop the res of masks down to 720p or even less. 480p usually works fine.
I personally use mask fix from comfy ui essentials at - https://github.com/cubiq/ComfyUI_essentials
many node sets have this ability and some do it faster than others.

Sign up or log in to comment