MCPcopy Create free account
hub / github.com/AMAP-ML/Eevee / input_video_embedder

Method input_video_embedder

models/training.py:149–159  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

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):

Callers 1

forward_preprocessMethod · 0.95

Calls 4

load_models_to_deviceMethod · 0.80
preprocess_videoMethod · 0.80
toMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected