|
|
|
@ -12,7 +12,6 @@
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
"""Diffusion denoising related modules for paddle"""
|
|
|
|
|
import math
|
|
|
|
|
from typing import Callable
|
|
|
|
|
from typing import Optional
|
|
|
|
|
from typing import Tuple
|
|
|
|
@ -21,12 +20,8 @@ import numpy as np
|
|
|
|
|
import paddle
|
|
|
|
|
import ppdiffusers
|
|
|
|
|
from paddle import nn
|
|
|
|
|
from ppdiffusers.models.embeddings import Timesteps
|
|
|
|
|
from ppdiffusers.schedulers import DDPMScheduler
|
|
|
|
|
|
|
|
|
|
from paddlespeech.t2s.modules.nets_utils import initialize
|
|
|
|
|
from paddlespeech.t2s.modules.residual_block import WaveNetResidualBlock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GaussianDiffusion(nn.Layer):
|
|
|
|
|
"""Common Gaussian Diffusion Denoising Model Module
|
|
|
|
|