Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Properly Release Resources in Viser Server? #347

Open
MarjordCpz opened this issue Dec 9, 2024 · 2 comments
Open

How to Properly Release Resources in Viser Server? #347

MarjordCpz opened this issue Dec 9, 2024 · 2 comments

Comments

@MarjordCpz
Copy link

MarjordCpz commented Dec 9, 2024

Hi, thanks for your fantastic visualizer!

I have encountered a problem while using Viser and would greatly appreciate your guidance. Thank you in advance for taking the time to help me—I truly value your support.

Problem description
I am currently using Viser in Gradio, and the overall implementation logic is as follows:

  • There is a button for switching data. When clicking the button, the reset method (scene.reset()) is called to reset the scene and load the next file.

But I found that as the number of loaded files increases, the memory usage of the task will continue to increase, and the resources of the previous scene cannot be effectively released.

My needs
Before loading a new scene, is there a way to completely release the memory resources of the previous scene to avoid the problem of increasing memory usage?
If Viser has a recommended method or related API, I hope to get some guidance.

Thank you for your help!

@brentyi
Copy link
Collaborator

brentyi commented Dec 11, 2024

Hi there!

There are some known issues here, which I addressed in #353. If that doesn't fix it and you have a runnable example I'm happy to investigate further!

@MarjordCpz
Copy link
Author

MarjordCpz commented Dec 11, 2024

@brentyi
Thank you so much for your prompt reply and assistance! I will give it a try within the next two days. My current workaround is not ideal—I wrote an additional script to monitor the Viser script and automatically restart it if it exceeds a certain threshold. At least it’s functioning for now.
If I encounter any further issues, I will provide timely feedback and runnable example. Once again, I greatly appreciate your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants