From 6a843b995fdcf41d215d0af6c848a01ea31a57f6 Mon Sep 17 00:00:00 2001 From: WolframRhodium Date: Thu, 15 Dec 2022 17:40:59 +0800 Subject: [PATCH] scripts/vsmlrt.py: semi-automatic input name retrieval for `inference()` --- scripts/vsmlrt.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/vsmlrt.py b/scripts/vsmlrt.py index 21b1da3..9b3b208 100644 --- a/scripts/vsmlrt.py +++ b/scripts/vsmlrt.py @@ -1,4 +1,4 @@ -__version__ = "3.14.2" +__version__ = "3.14.3" __all__ = [ "Backend", @@ -1379,7 +1379,7 @@ def inference( overlap: typing.Tuple[int, int] = (0, 0), tilesize: typing.Optional[typing.Tuple[int, int]] = None, backend: backendT = Backend.OV_CPU(), - input_name: str = "input" + input_name: typing.Optional[str] = "input" ) -> vs.VideoNode: if isinstance(clips, vs.VideoNode): @@ -1391,6 +1391,9 @@ def inference( backend = init_backend(backend=backend, trt_max_shapes=tilesize) + if input_name is None: + input_name = get_input_name(network_path) + return inference_with_fallback( clips=clips, network_path=network_path,