Spaces:
Running
Running
File size: 273 Bytes
89e8242 | 1 2 3 4 5 6 7 | 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()
|