Skip to content

Commit

Permalink
fix: purge_loras_on_download option in bridgeData
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Mar 24, 2024
1 parent c9b446d commit 91b64c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions horde_worker_regen/bridge_data/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class reGenBridgeData(CombinedHordeBridgeData):

exit_on_unhandled_faults: bool = Field(default=False)

purge_loras_on_download: bool = Field(default=False)

@model_validator(mode="after")
def validate_performance_modes(self) -> reGenBridgeData:
"""Validate the performance modes and set the appropriate values.
Expand Down
2 changes: 1 addition & 1 deletion horde_worker_regen/download_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def download_all_models(

SharedModelManager.load_model_managers()

if purge_unused_loras:
if purge_unused_loras or bridge_data.purge_loras_on_download:
logger.info("Purging unused LORAs...")
if SharedModelManager.manager.lora is None:
logger.error("Failed to load LORA model manager")
Expand Down

0 comments on commit 91b64c6

Please sign in to comment.