MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / DefaultBucketConfigNotExact

Class DefaultBucketConfigNotExact

datasets/bucket_config.py:361–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359
360
361class DefaultBucketConfigNotExact(DefaultBucketConfig):
362 flop = FlopEstimator2D1DNotExact
363
364 def __init__(self,
365 pixel_grading_num: int = 100,
366 frame_grading_num: int = 13) -> None:
367 super().__init__()
368 self.pixel_grading_arr = np.linspace(
369 self.side_list[0]**2,
370 self.side_list[-1]**2,
371 pixel_grading_num,
372 dtype=np.int64)
373 self.frame_grading_arr = np.arange(frame_grading_num) * 4 + 1
374
375 def __call__(self, n_frame: int, height: int, width: int,
376 rnd_state: np.random.RandomState) -> Any:
377 tgt_h, tgt_w = self.preprocess(n_frame, height, width, rnd_state)
378 flop = FlopEstimator2D1DNotExact(n_frame, tgt_h, tgt_w,
379 self.pixel_grading_arr,
380 self.frame_grading_arr)
381 return flop
382
383
384class BucketConfig3AR(BucketConfigFromSideList):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected