MCPcopy Create free account
hub / github.com/DPS2022/diffusion-posterior-sampling / TimestepBlock

Class TimestepBlock

guided_diffusion/unet.py:125–134  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

123
124
125class TimestepBlock(nn.Module):
126 """
127 Any module where forward() takes timestep embeddings as a second argument.
128 """
129
130 @abstractmethod
131 def forward(self, x, emb):
132 """
133 Apply the module to `x` given `emb` timestep embeddings.
134 """
135
136
137class TimestepEmbedSequential(nn.Sequential, TimestepBlock):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected