From 1bfca6189df0f06a39982d9fddcda86207642736 Mon Sep 17 00:00:00 2001 From: Johannes Stelzer Date: Tue, 21 Feb 2023 19:53:26 +0100 Subject: [PATCH] bugfix append --- gradio_ui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gradio_ui.py b/gradio_ui.py index b6074b0..c02af00 100644 --- a/gradio_ui.py +++ b/gradio_ui.py @@ -162,7 +162,6 @@ class BlendingFrontend(): list_latents = [torch.from_numpy(l).to(self.lb.device) for l in list_latents_cpu] return list_latents - def compute_img1(self, *args): list_ui_elem = args self.setup_lb(list_ui_elem) @@ -281,7 +280,13 @@ class BlendingFrontend(): shutil.copyfile(fp_movie_last, fp_movie_next) + self.lb.tree_latents[0] = self.load_latents(os.path.join(self.dp_imgs, f"img1_{self.user_id}.npy")) + self.lb.tree_latents[-1] = self.load_latents(os.path.join(self.dp_imgs, f"img2_{self.user_id}.npy")) self.lb.swap_forward() + + shutil.copyfile(os.path.join(self.dp_imgs, f"img2_{self.user_id}.npy"), os.path.join(self.dp_imgs, f"img1_{self.user_id}.npy")) + + fp_multi = self.multi_concat() list_out = [fp_multi]