mirror of
https://github.com/immich-app/immich.git
synced 2025-07-08 10:44:15 -04:00
Remove unused imports.
This commit is contained in:
parent
506ca0d3a4
commit
7aaf3aa57b
@ -1,18 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
import numpy as np
|
||||
import onnxruntime as ort
|
||||
from numpy.typing import NDArray
|
||||
from rknn.rknnpool import rknnPoolExecutor
|
||||
|
||||
|
||||
from app.models.constants import SUPPORTED_PROVIDERS
|
||||
from app.schemas import SessionNode
|
||||
|
||||
from ..config import log, settings
|
||||
from ..config import log
|
||||
|
||||
def runInfrence(rknn_lite, input):
|
||||
outputs = rknn_lite.inference(inputs=[input], data_format='nchw')
|
||||
@ -24,10 +22,12 @@ class RknnSession:
|
||||
|
||||
self.model_path = Path(model_path)
|
||||
self.ort_model_path = str(self.model_path).replace(".rknn", ".onnx")
|
||||
log.info(f"Loading RKNN model from {self.model_path} with {1 if 'textual' in str(self.model_path) else 2} threads.")
|
||||
self.tpe = 1 if 'textual' in str(self.model_path) else 2
|
||||
|
||||
log.info(f"Loading RKNN model from {self.model_path} with {self.tpe} threads.")
|
||||
self.rknnpool = rknnPoolExecutor(
|
||||
rknnModel=self.model_path.as_posix(),
|
||||
TPEs= 1 if 'textual' in str(self.model_path) else 2,
|
||||
TPEs= self.tpe,
|
||||
func=runInfrence)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user