Spaces:
Runtime error
Runtime error
Commit History
-
fix: enable multi-GPU round-robin for all inspection modules
Zhen Ye +1: Claude Opus 4.6 (1M context)All 4 inspection modules (depth, attention, superres, sam2_mask) previously used singleton patterns hardcoded to cuda:0. This adds per-device model caching with RLock-protected inference, matching the multi-GPU pattern used in the main inference pipeline. - Create inspection/gpu.py with thread-safe round-robin device selector - Replace singleton model instances with per-device caches in all modules - Wrap all GPU inference calls with per-model RLock for thread safety - Pass device from router endpoints through to module functions - All function signatures remain backward-compatible (device defaults to None) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>88a545a