Skip to content

Conversation

@Artemonim
Copy link

Description:

This update introduces significant VRAM optimization for the Gradio demo and improves the user experience with a more reliable completion notification.

  • VRAM Optimization: Implemented dynamic model swapping between the CPU and GPU. The Segment-Anything-Model (SAM) and the MatAnyone model are no longer kept in VRAM simultaneously. The active model is loaded onto the GPU only when required for its specific task (segmentation or matting), while the inactive model is offloaded to the CPU. This change dramatically reduces the VRAM footprint.
  • Reduced Hardware Requirements: As a result of the optimization, the Gradio demo can now run on GPUs with approximately 6-7 GB of VRAM, making it accessible to a wider range of users.

Optional

  • Cross-platform Completion Sound: Standard terminal bell (\a), ensuring reliable and cross-platform audio notification upon task completion.

Artemonim added 2 commits July 2, 2025 17:24
Refactors the Gradio demo to dynamically swap models (SAM and MatAnyone) between GPU and CPU, significantly lowering VRAM requirements to ~6-7 GB.
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