MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / __init__

Method __init__

models/base.py:77–90  ·  view source on GitHub ↗
(self, config, support_video=False, framerate=None, round_height=16, round_width=16, round_frames=4)

Source from the content-addressed store, hash-verified

75
76class PreprocessMediaFile:
77 def __init__(self, config, support_video=False, framerate=None, round_height=16, round_width=16, round_frames=4):
78 self.config = config
79 self.video_clip_mode = config.get('video_clip_mode', 'single_beginning')
80 print(f'using video_clip_mode={self.video_clip_mode}')
81 self.pil_to_tensor = transforms.Compose([transforms.ToTensor(), transforms.Normalize([0.5], [0.5])])
82 self.support_video = support_video
83 self.framerate = framerate
84 print(f'using framerate={self.framerate}')
85 self.round_height = round_height
86 self.round_width = round_width
87 self.round_frames = round_frames
88 if self.support_video:
89 assert self.framerate
90 self.tarfile_map = {}
91
92 def __del__(self):
93 for tar_f in self.tarfile_map.values():

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected