Skip to content

Commit

Permalink
fix: don't try to preload TIs
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Mar 4, 2024
1 parent c0b5c20 commit 31cc251
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions horde_worker_regen/process_management/inference_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,9 @@ def download_aux_models(self, job_info: ImageGenerateJobPopResponse) -> float |
if lora_manager is None:
raise RuntimeError("Failed to load LORA model manager")

ti_manager = self._shared_model_manager.manager.ti
if ti_manager is None:
raise RuntimeError("Failed to load TI model manager")

performed_a_download = False

loras = job_info.payload.loras
tis = job_info.payload.tis

try:
lora_manager.load_model_database()
Expand All @@ -286,19 +281,6 @@ def download_aux_models(self, job_info: ImageGenerateJobPopResponse) -> float |
lora_manager.fetch_adhoc_lora(lora_entry.name, timeout=45, is_version=lora_entry.is_version)
lora_manager.wait_for_downloads(45)

for ti_entry in tis:
if not ti_manager.is_model_available(ti_entry.name):
if not performed_a_download:
self.send_aux_model_message(
process_state=HordeProcessState.DOWNLOADING_AUX_MODEL,
info="Downloading auxiliary models",
time_elapsed=0.0,
job_info=job_info,
)
performed_a_download = True
ti_manager.fetch_adhoc_ti(ti_entry.name, timeout=45)
ti_manager.wait_for_downloads(45)

time_elapsed = round(time.time() - time_start, 2)

lora_manager.save_cached_reference_to_disk()
Expand Down

0 comments on commit 31cc251

Please sign in to comment.