ColabWan / shared /utils /model_unload.py
1ripon1's picture
Upload folder using huggingface_hub
7344bef verified
Raw
History Blame Contribute Delete
217 Bytes
import threading
from contextlib import contextmanager
_lock = threading.RLock()
@contextmanager
def model_unload_guard():
with _lock:
yield
def wait_for_model_unload():
with _lock:
pass