Skip to content

Commit

Permalink
feat: support hordelib's disk locking (for LoRas/TIs)
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Dec 29, 2023
1 parent 2a5f909 commit b6d6f17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion horde_worker_regen/process_management/inference_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
try:
with logger.catch(reraise=True):
self._horde = HordeLib(comfyui_callback=self._comfyui_callback)
self._shared_model_manager = SharedModelManager()
self._shared_model_manager = SharedModelManager(do_not_load_model_mangers=True)
except Exception as e:
logger.critical(f"Failed to initialise HordeLib: {type(e).__name__} {e}")
sys.exit(1)
Expand All @@ -123,6 +123,8 @@ def __init__(
logger.critical(f"Failed to initialise HordeCheckpointLoader: {type(e).__name__} {e}")
sys.exit(1)

SharedModelManager.load_model_managers(multiprocessing_lock=self.disk_lock)

if SharedModelManager.manager.compvis is None:
logger.critical("Failed to initialise SharedModelManager")
self.send_process_state_change_message(
Expand Down

0 comments on commit b6d6f17

Please sign in to comment.