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

Class DefaultBucketConfig3ARNotExact

datasets/bucket_config.py:406–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404
405
406class DefaultBucketConfig3ARNotExact(BucketConfig3AR):
407 flop = FlopEstimator2D1DNotExact
408
409 def __init__(self,
410 pixel_grading_num: int = 100,
411 frame_grading_num: int = 13) -> None:
412 super().__init__()
413 self.pixel_grading_arr = np.linspace(
414 self.side_list[0]**2,
415 self.side_list[-1]**2,
416 pixel_grading_num,
417 dtype=np.int64)
418 self.frame_grading_arr = np.arange(frame_grading_num) * 4 + 1
419
420 def __call__(self, n_frame: int, height: int, width: int,
421 rnd_state: np.random.RandomState) -> Any:
422 tgt_h, tgt_w = self.preprocess(n_frame, height, width, rnd_state)
423 flop = FlopEstimator2D1DNotExact(n_frame, tgt_h, tgt_w,
424 self.pixel_grading_arr,
425 self.frame_grading_arr)
426 return flop

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected