init commit

This commit is contained in:
AIFSH
2024-10-25 14:12:45 +08:00
parent c5e94166fe
commit dae44f5480
374 changed files with 765716 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Copyright (c) 2023 Amphion.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch.nn as nn
from abc import abstractmethod
class UNetBlock(nn.Module):
r"""Any module where forward() takes timestep embeddings as a second argument."""
@abstractmethod
def forward(self, x, emb):
r"""Apply the module to `x` given `emb` timestep embeddings."""