BrokenSource / DepthFlow

🌊 Images to → 2.5D Parallax Effect Video. A Free and Open Source ImmersityAI alternative
https://brokensrc.dev
MIT License
487 stars 32 forks source link

Observed VRAM Memory Leak #61

Open xD0135 opened 2 days ago

xD0135 commented 2 days ago

🔘 Operating system

Linux (Arch-like)

🔘 Runtime enviroment

PyAPP Executables (experimental)

🔘 Python version

N/A

🔘 GPU Vendor

NVIDIA Desktop

🔘 Description

Version: $ ./depthflow-linux-amd64-v0.8.0.bin --version DepthFlow 0.8.0 linux-amd64

I observed a memory leak when continuously rendering the video after playing around with the animation settings.

This is when I simply click the render button for the first time, everything looks good: image

This is after the 4th click on Render image

And this is after the 8th click on Render image

To reproduce this issue, simply keep clicking on the Render button and monitor your VRAM usage, and you'll see the issue.

🔘 Traceback

No response

Tremeschin commented 2 days ago

Oh yea, I did some recent work on fixing a couple dumb memory leaks here and there, the one you're describing (vram) is probably fixed on this commit https://github.com/BrokenSource/ShaderFlow/commit/6080f4b8c67db2f301086b49058a0777ee90d450 not present on the v0.8, as well as (system ram) on https://github.com/BrokenSource/ShaderFlow/commit/ca6c33e064338c1e21ec027dd36991f3c90ac4c5

I'm a bit of far away from a v0.9 release as there's lots of changes and additions, you could run directly from source https://brokensrc.dev/get/source/ for fixes and new features https://brokensrc.dev/about/changelog/#0.9.0-depthflow temporarily, beware dragons! (I'll be on a month long road trip on dec 20th, could be a 2025 release 😅)

I'm working internally on properly sharing models, thread safety, etc this week. I should add a jobs queue to the webui to avoid recreating the scenes and for thread workers to render the jobs, will be much more leak-resistant, no recreation of opengl contexts, faster render times (no init), etc.

xD0135 commented 2 days ago

Awesome! Thank you so much for this great work! Feel free to close, or keep it open until v0.9.0 is released for tracking purposes :smiley_cat:

Tremeschin commented 2 days ago

I'll keep it open and move to depthflow repo (even tho it's mainly the other proj issues) for awareness until the 0.9 yea :)