mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(ml): configurable batch size for facial recognition (#13689)
* configurable batch size, default openvino to 1 * update docs * don't add a new dependency for two lines * fix typing
This commit is contained in:
parent
a76c39812f
commit
1ec9a60e41
4 changed files with 70 additions and 31 deletions
|
|
@ -19,6 +19,10 @@ class PreloadModelData(BaseModel):
|
|||
facial_recognition: str | None = None
|
||||
|
||||
|
||||
class MaxBatchSize(BaseModel):
|
||||
facial_recognition: int | None = None
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(
|
||||
env_prefix="MACHINE_LEARNING_",
|
||||
|
|
@ -41,6 +45,7 @@ class Settings(BaseSettings):
|
|||
ann_fp16_turbo: bool = False
|
||||
ann_tuning_level: int = 2
|
||||
preload: PreloadModelData | None = None
|
||||
max_batch_size: MaxBatchSize | None = None
|
||||
|
||||
@property
|
||||
def device_id(self) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue