MCPcopy Create free account
hub / github.com/CompVis/diff2flow / forward

Method forward

diff2flow/models/unet/attention.py:266–267  ·  view source on GitHub ↗
(self, x, context=None)

Source from the content-addressed store, hash-verified

264 self.checkpoint = checkpoint
265
266 def forward(self, x, context=None):
267 return checkpoint(self._forward, (x, context), self.parameters(), self.checkpoint)
268
269 def _forward(self, x, context=None):
270 x = self.attn1(self.norm1(x), context=context if self.disable_self_attn else None) + x

Callers

nothing calls this directly

Calls 1

checkpointFunction · 0.70

Tested by

no test coverage detected