How to find out which node has the memory leak?

Hey my friends,

I have used a workflow to batch upscale videos. It worked fine for months. But recently i always run into an out of memory after the first three or four videos. I can see the ram usage going up after each run. Up to the point where it fails then.

The workflow is pretty simple. You have a load video node. A upscale image node (using model). A upscale Image node to bring the result into final shape. And then it goes already into the Video Combine node.

What i tried so far:
I reduced the workflow to a single video. And rendered them one by one. Problem persists.
I added a vram debug node in hope it clears the ram. Problem persists.
I ran the workflow in a completely new portable installation. Problem persists.

Could somebody give me a hint what to do next please? Which node here is the trouble maker?

Image is workflow:

1 Like

Okay, the memory leak seems to be in the ComfyUI code. Not the nodes.

I reduced the workflow to just the upscale by model. In a second step i reduced the workflow to just upscale image to 1920 x 1080. So two different solutions with different nodes. And both times i get a out of system memory after a handful runs.

Installed older version of ComfyUI. 0.3.5. Here it simply works fine for even the 50th video. And you can see a massive ram drop after ervery run. And it will finish video 40 like it did with video 1. In newest ComfyUI the same workflow the memory consumption adds and adds and adds, until it throws the oom after a few runs.

Will create a bug report now.

1 Like

Done. I wish i could be of more help here :frowning:

1 Like

Just find and report has great value. Let’s wait if they can address it. :saluting_face: