From 7b18b2027e6f433ce0567da0c7b00541a7b2d378 Mon Sep 17 00:00:00 2001 From: Jordan Thompson Date: Sat, 22 Jul 2023 10:22:50 -0700 Subject: [PATCH] Update WAS_Node_Suite.py --- WAS_Node_Suite.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py index 630bc8b..1743787 100644 --- a/WAS_Node_Suite.py +++ b/WAS_Node_Suite.py @@ -3595,6 +3595,9 @@ class WAS_Image_Morph_GIF: def create_morph_gif(self, image_a, image_b, transition_frames=10, still_image_delay_ms=10, duration_ms=0.1, loops=0, max_size=512, output_path="./ComfyUI/output", filename="morph", filetype="GIF"): + tokens = TextTokens() + WTools = WAS_Tools_Class() + if 'imageio' not in packages(): cstr("Installing imageio...").msg.print() subprocess.check_call( @@ -3622,10 +3625,7 @@ class WAS_Image_Morph_GIF: duration_ms = 0.1 elif duration_ms > 60000.0: duration_ms = 60000.0 - - tokens = TextTokens() - WTools = WAS_Tools_Class() - + output_file = WTools.morph_images([tensor2pil(image_a), tensor2pil(image_b)], steps=int(transition_frames), max_size=int(max_size), loop=int(loops), still_duration=int(still_image_delay_ms), duration=int(duration_ms), output_path=output_path, filename=tokens.parseTokens(filename), filetype=filetype)