MCPcopy Create free account
hub / github.com/PKU-YuanGroup/MagicTime / update_motion_module

Method update_motion_module

app.py:156–162  ·  view source on GitHub ↗
(self, motion_module_dropdown)

Source from the content-addressed store, hash-verified

154 return gr.Dropdown()
155
156 def update_motion_module(self, motion_module_dropdown):
157 self.selected_motion_module = motion_module_dropdown
158 motion_module_dropdown = os.path.join(self.motion_module_dir, motion_module_dropdown)
159 motion_module_state_dict = torch.load(motion_module_dropdown, map_location="cpu")
160 _, unexpected = self.unet.load_state_dict(motion_module_state_dict, strict=False)
161 assert len(unexpected) == 0
162 return gr.Dropdown()
163
164 def update_motion_module_2(self, motion_module_dropdown):
165 self.selected_motion_module = motion_module_dropdown

Callers 2

__init__Method · 0.95
magictimeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected