mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
fix granularity
This commit is contained in:
parent
05675921be
commit
3634ae1f5b
@ -167,9 +167,7 @@ Redis (Sentinel) URL example JSON before encoding:
|
|||||||
| `MACHINE_LEARNING_DEVICE_IDS`<sup>\*4</sup> | Device IDs to use in multi-GPU environments | `0` | machine learning |
|
| `MACHINE_LEARNING_DEVICE_IDS`<sup>\*4</sup> | Device IDs to use in multi-GPU environments | `0` | machine learning |
|
||||||
| `MACHINE_LEARNING_MAX_BATCH_SIZE__FACIAL_RECOGNITION` | Set the maximum number of faces that will be processed at once by the facial recognition model | None (`1` if using OpenVINO) | machine learning |
|
| `MACHINE_LEARNING_MAX_BATCH_SIZE__FACIAL_RECOGNITION` | Set the maximum number of faces that will be processed at once by the facial recognition model | None (`1` if using OpenVINO) | machine learning |
|
||||||
| `MACHINE_LEARNING_RKNN` | Enable RKNN hardware acceleration if supported | `True` | machine learning |
|
| `MACHINE_LEARNING_RKNN` | Enable RKNN hardware acceleration if supported | `True` | machine learning |
|
||||||
| `MACHINE_LEARNING_RKNN_TEXTUAL_THREADS` | How many threads of RKNN runtime should be spinned up while infrencing textual model. | `1` | machine learning |
|
| `MACHINE_LEARNING_RKNN_THREADS` | How many threads of RKNN runtime should be spinned up while inferencing. | `1` | machine learning |
|
||||||
| `MACHINE_LEARNING_RKNN_VISUAL_THREADS` | How many threads of RKNN runtime should be spinned up while infrencing visual model. | `1` | machine learning |
|
|
||||||
| `MACHINE_LEARNING_RKNN_FACIAL_THREADS` | How many threads of RKNN runtime should be spinned up while infrencing facial model. | `1` | machine learning |
|
|
||||||
|
|
||||||
\*1: It is recommended to begin with this parameter when changing the concurrency levels of the machine learning service and then tune the other ones.
|
\*1: It is recommended to begin with this parameter when changing the concurrency levels of the machine learning service and then tune the other ones.
|
||||||
|
|
||||||
|
@ -45,9 +45,7 @@ class Settings(BaseSettings):
|
|||||||
ann_fp16_turbo: bool = False
|
ann_fp16_turbo: bool = False
|
||||||
ann_tuning_level: int = 2
|
ann_tuning_level: int = 2
|
||||||
rknn: bool = True
|
rknn: bool = True
|
||||||
rknn_textual_threads: int = 1
|
rknn_threads: int = 1
|
||||||
rknn_visual_threads: int = 1
|
|
||||||
rknn_facial_detection_threads: int = 1
|
|
||||||
preload: PreloadModelData | None = None
|
preload: PreloadModelData | None = None
|
||||||
max_batch_size: MaxBatchSize | None = None
|
max_batch_size: MaxBatchSize | None = None
|
||||||
|
|
||||||
|
@ -24,12 +24,7 @@ class RknnSession:
|
|||||||
self.model_path = Path(str(model_path).replace("model", soc_name))
|
self.model_path = Path(str(model_path).replace("model", soc_name))
|
||||||
self.ort_model_path = Path(str(self.model_path).replace(f"{soc_name}.rknn", "model.onnx"))
|
self.ort_model_path = Path(str(self.model_path).replace(f"{soc_name}.rknn", "model.onnx"))
|
||||||
|
|
||||||
if "textual" in str(self.model_path):
|
self.tpe = settings.rknn_threads
|
||||||
self.tpe = settings.rknn_textual_threads
|
|
||||||
elif "visual" in str(self.model_path):
|
|
||||||
self.tpe = settings.rknn_visual_threads
|
|
||||||
else:
|
|
||||||
self.tpe = settings.rknn_facial_detection_threads
|
|
||||||
|
|
||||||
log.info(f"Loading RKNN model from {self.model_path} with {self.tpe} threads.")
|
log.info(f"Loading RKNN model from {self.model_path} with {self.tpe} threads.")
|
||||||
self.rknnpool = RknnPoolExecutor(rknnModel=self.model_path.as_posix(), tpes=self.tpe, func=runInfrence)
|
self.rknnpool = RknnPoolExecutor(rknnModel=self.model_path.as_posix(), tpes=self.tpe, func=runInfrence)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user