MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / decode_video

Method decode_video

diffsynth/models/cog_vae.py:238–251  ·  view source on GitHub ↗
(self, sample, tiled=True, tile_size=(60, 90), tile_stride=(30, 45), progress_bar=lambda x:x)

Source from the content-addressed store, hash-verified

236
237
238 def decode_video(self, sample, tiled=True, tile_size=(60, 90), tile_stride=(30, 45), progress_bar=lambda x:x):
239 if tiled:
240 B, C, T, H, W = sample.shape
241 return TileWorker2Dto3D().tiled_forward(
242 forward_fn=lambda x: self.decode_small_video(x),
243 model_input=sample,
244 tile_size=tile_size, tile_stride=tile_stride,
245 tile_device=sample.device, tile_dtype=sample.dtype,
246 computation_device=sample.device, computation_dtype=sample.dtype,
247 scales=(3/16, (T//2*8+T%2)/T, 8, 8),
248 progress_bar=progress_bar
249 )
250 else:
251 return self.decode_small_video(sample)
252
253
254 def decode_small_video(self, sample):

Callers

nothing calls this directly

Calls 3

decode_small_videoMethod · 0.95
TileWorker2Dto3DClass · 0.85
tiled_forwardMethod · 0.45

Tested by

no test coverage detected