Skip to content

Commit

Permalink
scripts/vsmlrt.py: semi-automatic input name retrieval for inference()
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Dec 15, 2022
1 parent c1ccf9d commit 6a843b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/vsmlrt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.14.2"
__version__ = "3.14.3"

__all__ = [
"Backend",
Expand Down Expand Up @@ -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):
Expand All @@ -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,
Expand Down

0 comments on commit 6a843b9

Please sign in to comment.