fakeshield-api / app /models /loader_sync.py
Akash4911's picture
Initial Deploy: FakeShield Backend v2.0 (Sovereign Vanguard)
89e8242
import threading
# Global lock to prevent race conditions during parallel Transformer model loading.
# This ensures only one model is being initialized at a time, protecting
# against "meta tensor" crashes when accelerate is installed.
MODEL_LOAD_LOCK = threading.Lock()