From 56f68bd9653649c8094eb7e9b8f8be339746bc77 Mon Sep 17 00:00:00 2001 From: Johannes Stelzer Date: Thu, 19 Jan 2023 11:00:35 +0100 Subject: [PATCH 1/3] multi transition first and last image saving --- latent_blending.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/latent_blending.py b/latent_blending.py index 6412604..b053024 100644 --- a/latent_blending.py +++ b/latent_blending.py @@ -109,6 +109,8 @@ class LatentBlending(): self.branch1_insertion_completed = False self.set_guidance_scale(guidance_scale) self.init_mode() + self.multi_transition_img_first = None + self.multi_transition_img_last = None def init_mode(self): @@ -574,7 +576,7 @@ class LatentBlending(): if i==0: self.set_prompt1(list_prompts[i]) self.set_prompt2(list_prompts[i+1]) - recycle_img1 = False + recycle_img1 = False else: self.swap_forward() self.set_prompt2(list_prompts[i+1]) @@ -584,11 +586,15 @@ class LatentBlending(): list_imgs = self.run_transition(recycle_img1=recycle_img1, fixed_seeds=local_seeds) list_imgs_interp = add_frames_linear_interp(list_imgs, fps, duration_single_trans) + if i==0: + self.multi_transition_img_first = list_imgs[0] + # Save movie frame for img in list_imgs_interp: ms.write_frame(img) ms.finalize() + self.multi_transition_img_last = list_imgs[-1] print("run_multi_transition: All completed.") From fcdcdc64cd50839fc84b77930c234cd2608d4391 Mon Sep 17 00:00:00 2001 From: Lunar Ring <78172771+lunarring@users.noreply.github.com> Date: Fri, 20 Jan 2023 13:29:07 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14c9f26..474c547 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,8 @@ To run a simple transition between two prompts, run `example1_standard.py` To run a transition between two prompts where you want some part of the image to remain static, run `example2_inpaint.py` ## Example 3: Multi transition -To run multiple transition between K prompts, resulting in a stitched video, run `example3_multitrans.py` +To run multiple transition between K prompts, resulting in a stitched video, run `example3_multitrans.py`. +[View a longer example video here](https://vimeo.com/789052336/80dcb545b2 ## Example 4: High-resolution with upscaling ![](example4.jpg) From 6e882225744fbb81f3ac54dbbf483b848c4d3019 Mon Sep 17 00:00:00 2001 From: Lunar Ring <78172771+lunarring@users.noreply.github.com> Date: Fri, 20 Jan 2023 13:29:37 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 474c547..00695a5 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ To run a transition between two prompts where you want some part of the image to ## Example 3: Multi transition To run multiple transition between K prompts, resulting in a stitched video, run `example3_multitrans.py`. -[View a longer example video here](https://vimeo.com/789052336/80dcb545b2 +[View a longer example video here.](https://vimeo.com/789052336/80dcb545b2) ## Example 4: High-resolution with upscaling ![](example4.jpg)