MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / encode_video

Function encode_video

diffusers/examples/cogvideo/train_cogvideox_lora.py:1237–1242  ·  view source on GitHub ↗
(video, bar)

Source from the content-addressed store, hash-verified

1235 )
1236
1237 def encode_video(video, bar):
1238 bar.update(1)
1239 video = video.to(accelerator.device, dtype=vae.dtype).unsqueeze(0)
1240 video = video.permute(0, 2, 1, 3, 4) # [B, C, F, H, W]
1241 latent_dist = vae.encode(video).latent_dist
1242 return latent_dist
1243
1244 progress_encode_bar = tqdm(
1245 range(0, len(train_dataset.instance_videos)),

Callers 1

mainFunction · 0.85

Calls 3

updateMethod · 0.45
toMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected