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

Implement lazy loading for models to improve memory usage #65

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TheSeanLavery
Copy link

Problem:

  • Loading all models at startup causes high memory usage
  • Users with limited VRAM may experience out-of-memory errors
  • Slow initial startup time due to loading all models

Solution:

  • Implement lazy loading for all models (shape gen, texture gen, background removal)
  • Models are now loaded only when needed instead of all at startup
  • Each model is loaded on first use and cached for subsequent uses

Benefits:

  • Prevents out-of-memory issues on GPUs with limited VRAM
  • Faster initial startup time
  • More efficient resource usage

Testing:

  • Tested on RTX 3090 with successful model loading and generation
  • Verified memory usage is significantly reduced during startup
  • Confirmed all functionality works as expected with lazy loading

- Add lazy loading for all models (shape gen, texture gen, background removal)
- Models are now loaded only when needed instead of all at startup
- Helps prevent out-of-memory issues on GPUs with limited VRAM
- Improves initial startup time
- Add step-by-step workflow with numbered buttons
- Simplify interface by removing tabs and combining text/image input
- Add clear button labels for each generation step
- Fix typos in warning messages
- Move background removal option to advanced settings
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

Successfully merging this pull request may close these issues.

1 participant