(self, inputs)
| 147 | |
| 148 | |
| 149 | def input_video_embedder(self, inputs): |
| 150 | self.pipe.load_models_to_device(["vae"]) |
| 151 | input_video = self.pipe.preprocess_video(inputs["input_video"]) |
| 152 | input_latents = self.pipe.vae.encode(input_video, device=self.pipe.device, tiled=inputs["tiled"], tile_size=None, tile_stride=None).to(dtype=self.pipe.torch_dtype, device=self.pipe.device) |
| 153 | vace_reference_image = [inputs["vace_reference_image"]] |
| 154 | vace_reference_image = self.pipe.preprocess_video(vace_reference_image) |
| 155 | vace_reference_latents = self.pipe.vae.encode(vace_reference_image, device=self.pipe.device).to(dtype=self.pipe.torch_dtype, device=self.pipe.device) |
| 156 | input_latents = torch.concat([vace_reference_latents, input_latents], dim=2) # torch.Size([1, 16, 6, 60, 104]) |
| 157 | inputs["latents"] = inputs["noise"] |
| 158 | inputs["input_latents"] = input_latents |
| 159 | return inputs |
| 160 | |
| 161 | |
| 162 | def vace(self, inputs): |
no test coverage detected