From 64c9c0405015ff58a81378ade621f481241b8799 Mon Sep 17 00:00:00 2001 From: tazlin Date: Wed, 27 Dec 2023 11:44:54 -0500 Subject: [PATCH 1/5] feat: support hordelib's disk locking (for LoRas/TIs) --- horde_worker_regen/process_management/inference_process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/horde_worker_regen/process_management/inference_process.py b/horde_worker_regen/process_management/inference_process.py index 434b3b1f..5c87c5ca 100644 --- a/horde_worker_regen/process_management/inference_process.py +++ b/horde_worker_regen/process_management/inference_process.py @@ -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) @@ -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( From a55354700ec3a02b2b0da5b895a0e0770b9dcbfa Mon Sep 17 00:00:00 2001 From: tazlin Date: Wed, 27 Dec 2023 11:48:37 -0500 Subject: [PATCH 2/5] fix: use compat. version of hordelib --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fba90151..c156aab2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ torch>=2.1.0 horde_sdk>=0.7.15 horde_safety>=0.2.3 -hordelib~=2.2.3 +hordelib~=2.3.0 horde_model_reference python-dotenv From bd3e13ebabe31816dcfd90aa0ecbe1870dfcbc31 Mon Sep 17 00:00:00 2001 From: db0 Date: Wed, 27 Dec 2023 18:58:34 +0100 Subject: [PATCH 3/5] feat: set version to 3 manually for testing loras --- horde_worker_regen/process_management/process_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horde_worker_regen/process_management/process_manager.py b/horde_worker_regen/process_management/process_manager.py index 062c0e00..906a9a83 100644 --- a/horde_worker_regen/process_management/process_manager.py +++ b/horde_worker_regen/process_management/process_manager.py @@ -1899,7 +1899,7 @@ async def api_job_pop(self) -> None: job_pop_request = ImageGenerateJobPopRequest( apikey=self.bridge_data.api_key, name=self.bridge_data.dreamer_worker_name, - bridge_agent="AI Horde Worker reGen:2:https://github.com/Haidra-Org/horde-worker-reGen/#20231227_0", + bridge_agent="AI Horde Worker reGen:3:https://github.com/Haidra-Org/horde-worker-reGen/#20231227_0", bridge_version=2, models=self.bridge_data.image_models_to_load, nsfw=self.bridge_data.nsfw, From 2dfe124a45440db853fcec91aa0c74b41716bcae Mon Sep 17 00:00:00 2001 From: db0 Date: Wed, 27 Dec 2023 19:00:03 +0100 Subject: [PATCH 4/5] fix: ensure sdk latest to handle lora versions --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c156aab2..94effffe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ --extra-index-url https://download.pytorch.org/whl/cu121 torch>=2.1.0 -horde_sdk>=0.7.15 +horde_sdk>=0.7.25 horde_safety>=0.2.3 hordelib~=2.3.0 horde_model_reference From cf2f8bd56713776e0af75dccb18449f6b6e41481 Mon Sep 17 00:00:00 2001 From: tazlin Date: Wed, 27 Dec 2023 14:29:33 -0500 Subject: [PATCH 5/5] fix: use compat. version of horde_sdk --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 94effffe..2d91e3b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ --extra-index-url https://download.pytorch.org/whl/cu121 torch>=2.1.0 -horde_sdk>=0.7.25 +horde_sdk>=0.7.26 horde_safety>=0.2.3 hordelib~=2.3.0 horde_model_reference