Any module where forward() takes timestep embeddings as a second argument.
| 146 | |
| 147 | |
| 148 | class TimestepBlock(nn.Module): |
| 149 | """ |
| 150 | Any module where forward() takes timestep embeddings as a second argument. |
| 151 | """ |
| 152 | |
| 153 | @abstractmethod |
| 154 | def forward(self, x, emb): |
| 155 | """ |
| 156 | Apply the module to `x` given `emb` timestep embeddings. |
| 157 | """ |
| 158 | |
| 159 | |
| 160 | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): |
nothing calls this directly
no outgoing calls
no test coverage detected