MCPcopy Create free account
hub / github.com/modelscope/DiffSynth-Studio / encode_video

Method encode_video

diffsynth/pipelines/sd_video.py:133–140  ·  view source on GitHub ↗
(self, processed_images, tiled=False, tile_size=64, tile_stride=32)

Source from the content-addressed store, hash-verified

131
132
133 def encode_video(self, processed_images, tiled=False, tile_size=64, tile_stride=32):
134 latents = []
135 for image in processed_images:
136 image = self.preprocess_image(image).to(device=self.device, dtype=self.torch_dtype)
137 latent = self.encode_image(image, tiled=tiled, tile_size=tile_size, tile_stride=tile_stride)
138 latents.append(latent.cpu())
139 latents = torch.concat(latents, dim=0)
140 return latents
141
142
143 @torch.no_grad()

Callers 3

__call__Method · 0.95
encode_video_with_vaeMethod · 0.45
__call__Method · 0.45

Calls 4

cpuMethod · 0.80
toMethod · 0.45
preprocess_imageMethod · 0.45
encode_imageMethod · 0.45

Tested by

no test coverage detected