diff --git a/horde_worker_regen/bridge_data/data_model.py b/horde_worker_regen/bridge_data/data_model.py index 06545a17..ca72e6c2 100644 --- a/horde_worker_regen/bridge_data/data_model.py +++ b/horde_worker_regen/bridge_data/data_model.py @@ -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. diff --git a/horde_worker_regen/download_models.py b/horde_worker_regen/download_models.py index 04fa4745..0f0cdbc1 100644 --- a/horde_worker_regen/download_models.py +++ b/horde_worker_regen/download_models.py @@ -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")