Denoiser
Denoiser
Bases: Module
Conditional Diffusion Denoiser.
This module implements a denoising model conditioned on a diffusion step, a conditioner, and a speaker embedding. It consists of several convolutional and linear projections followed by residual blocks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_config |
DiffusionConfig
|
Model configuration dictionary. |
required |
Attributes:
Name | Type | Description |
---|---|---|
input_projection |
Sequential
|
Sequential module for input projection. |
diffusion_embedding |
DiffusionEmbedding
|
Diffusion step embedding module. |
mlp |
Sequential
|
Multilayer perceptron module. |
residual_layers |
ModuleList
|
List of residual blocks. |
skip_projection |
ConvNorm
|
Convolutional projection for skip connections. |
output_projection |
ConvNorm
|
Convolutional projection for output. |
Source code in models/enhancer/gaussian_diffusion/denoiser.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
forward(mel, diffusion_step, conditioner, speaker_emb)
Forward pass through the Denoiser module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mel |
Tensor
|
Mel-spectrogram tensor of shape [B, 1, M, T]. |
required |
diffusion_step |
Tensor
|
Diffusion step tensor of shape [B,]. |
required |
conditioner |
Tensor
|
Conditioner tensor of shape [B, M, T]. |
required |
speaker_emb |
Tensor
|
Speaker embedding tensor of shape [B, M]. |
required |
Returns:
Type | Description |
---|---|
Tensor
|
torch.Tensor: Output mel-spectrogram tensor of shape [B, 1, M, T]. |
Source code in models/enhancer/gaussian_diffusion/denoiser.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|