MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / forward

Method forward

lvdm/common.py:109–116  ·  view source on GitHub ↗
(ctx, run_function, length, *args)

Source from the content-addressed store, hash-verified

107 @staticmethod
108 @torch.cuda.amp.custom_fwd
109 def forward(ctx, run_function, length, *args):
110 ctx.run_function = run_function
111 ctx.input_tensors = list(args[:length])
112 ctx.input_params = list(args[length:])
113
114 with torch.no_grad():
115 output_tensors = ctx.run_function(*ctx.input_tensors)
116 return output_tensors
117
118 @staticmethod
119 @torch.cuda.amp.custom_bwd # add this

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected