Spaces:
Runtime error
Runtime error
Download modules/diffusion/unet/basic.py from amphion/singing_voice_conversion: direct link, hf CLI and curl.
- Browser
- Download file 450 Bytes
-
https://huggingface.co/spaces/amphion/singing_voice_conversion/resolve/main/modules/diffusion/unet/basic.py
- Command line
-
hf download hf://spaces/amphion/singing_voice_conversion/modules/diffusion/unet/basic.py
-
curl -L -o basic.py https://huggingface.co/spaces/amphion/singing_voice_conversion/resolve/main/modules/diffusion/unet/basic.py
450 Bytes
| # 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.""" | |
| def forward(self, x, emb): | |
| r"""Apply the module to `x` given `emb` timestep embeddings.""" | |