mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix typing
This commit is contained in:
parent
e71523d6ed
commit
2c2cf59f09
1 changed files with 5 additions and 2 deletions
|
|
@ -12,7 +12,6 @@ from huggingface_hub import snapshot_download
|
||||||
from onnx.shape_inference import infer_shapes
|
from onnx.shape_inference import infer_shapes
|
||||||
from onnx.tools.update_model_dims import update_inputs_outputs_dims
|
from onnx.tools.update_model_dims import update_inputs_outputs_dims
|
||||||
from typing_extensions import Buffer
|
from typing_extensions import Buffer
|
||||||
|
|
||||||
import ann.ann
|
import ann.ann
|
||||||
from app.models.constants import STATIC_INPUT_PROVIDERS, SUPPORTED_PROVIDERS
|
from app.models.constants import STATIC_INPUT_PROVIDERS, SUPPORTED_PROVIDERS
|
||||||
|
|
||||||
|
|
@ -146,7 +145,11 @@ class InferenceModel(ABC):
|
||||||
# check_model gets called in update_inputs_outputs_dims and doesn't work for large models
|
# check_model gets called in update_inputs_outputs_dims and doesn't work for large models
|
||||||
check_model = onnx.checker.check_model
|
check_model = onnx.checker.check_model
|
||||||
try:
|
try:
|
||||||
onnx.checker.check_model = lambda _: None
|
|
||||||
|
def check_model_stub(*args: Any, **kwargs: Any) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
onnx.checker.check_model = check_model_stub
|
||||||
updated_model = update_inputs_outputs_dims(inferred, inputs, outputs)
|
updated_model = update_inputs_outputs_dims(inferred, inputs, outputs)
|
||||||
finally:
|
finally:
|
||||||
onnx.checker.check_model = check_model
|
onnx.checker.check_model = check_model
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue