MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / create_custom_forward

Method create_custom_forward

diffsynth/models/svd_unet.py:392–395  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

390
391 # 3. blocks
392 def create_custom_forward(module):
393 def custom_forward(*inputs):
394 return module(*inputs)
395 return custom_forward
396 for i, block in enumerate(self.blocks):
397 if self.training and use_gradient_checkpointing and not (isinstance(block, PushBlock) or isinstance(block, PopBlock) or isinstance(block, PopMixBlock)):
398 hidden_states, time_emb, text_emb, res_stack = torch.utils.checkpoint.checkpoint(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected