MCPcopy Create free account
hub / github.com/360CVGroup/FancyVideo / create_custom_forward

Method create_custom_forward

fancyvideo/models/unet_blocks.py:841–845  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

839
840 if self.training and self.gradient_checkpointing:
841 def create_custom_forward(module):
842 def custom_forward(*inputs):
843 return module(*inputs)
844
845 return custom_forward
846
847 hidden_states = torch.utils.checkpoint.checkpoint(create_custom_forward(resnet), hidden_states, temb)
848 if motion_module is not None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected