MCPcopy Create free account
hub / github.com/aim-uofa/Framer / create_custom_forward

Method create_custom_forward

models_diffusers/unet_3d_blocks.py:1552–1556  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

1550 if self.training and self.gradient_checkpointing:
1551
1552 def create_custom_forward(module):
1553 def custom_forward(*inputs):
1554 return module(*inputs)
1555
1556 return custom_forward
1557
1558 if is_torch_version(">=", "1.11.0"):
1559 hidden_states = torch.utils.checkpoint.checkpoint(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected