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

Class TimestepBlock

diff2flow/models/unet/openaimodel.py:65–74  ·  view source on GitHub ↗

Any module where forward() takes timestep embeddings as a second argument.

Source from the content-addressed store, hash-verified

63
64
65class TimestepBlock(nn.Module):
66 """
67 Any module where forward() takes timestep embeddings as a second argument.
68 """
69
70 @abstractmethod
71 def forward(self, x, emb):
72 """
73 Apply the module to `x` given `emb` timestep embeddings.
74 """
75
76
77class TimestepEmbedSequential(nn.Sequential, TimestepBlock):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected