From fb56b2db7caa79287c45800d784900132405c32e Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Sun, 24 Nov 2024 19:47:26 -0600 Subject: [PATCH] Remove args indexing from vae decoding Newer versions of python support indexing multiple dimensions by prefixing a variable with an aseterisk similar to how it can be used for functions. This was utilized to discard higher dimensions (excess frames) produced by vae output when using temporal vae, but causes syntax errors with older versions of python. This is fixed by using a while loop instead. Resolves #321 --- videohelpersuite/nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/videohelpersuite/nodes.py b/videohelpersuite/nodes.py index b99506d..1945c10 100755 --- a/videohelpersuite/nodes.py +++ b/videohelpersuite/nodes.py @@ -287,7 +287,8 @@ class VideoCombine: #repush first_image images = itertools.chain([first_image], images) #A single image has 3 dimensions. Discard higher dimensions - first_image = first_image[*([0]*(len(first_image.shape)-3))] + while len(first_image.shape) > 3: + first_image = first_image[0] else: first_image = images[0] images = iter(images)