mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 15:19:59 +08:00
在其他推理部分加载torch_musa
This commit is contained in:
parent
158f85c745
commit
f7d3d32cf0
@ -7,6 +7,10 @@ sys.path.append(now_dir)
|
||||
from typing import Dict
|
||||
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from pytorch_lightning import LightningModule
|
||||
from AR.models.t2s_model import Text2SemanticDecoder
|
||||
from AR.modules.lr_schedulers import WarmupCosineLRSchedule
|
||||
|
@ -1,6 +1,10 @@
|
||||
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/t2s_model.py
|
||||
# reference: https://github.com/lifeiteng/vall-e
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from tqdm import tqdm
|
||||
|
||||
from AR.models.utils import make_pad_mask
|
||||
|
@ -1,6 +1,10 @@
|
||||
# modified from https://github.com/yangdongchao/SoundStorm/blob/master/soundstorm/s1/AR/models/utils.py
|
||||
# reference: https://github.com/lifeiteng/vall-e
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
import torch.nn.functional as F
|
||||
from typing import Tuple
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
from typing import Optional
|
||||
from typing import Tuple
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import Tensor
|
||||
from torch.nn import Linear
|
||||
from torch.nn import Module
|
||||
|
@ -2,6 +2,10 @@
|
||||
import math
|
||||
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
|
||||
|
||||
|
@ -7,6 +7,10 @@ from torch.nn.functional import (
|
||||
)
|
||||
from torch.nn import functional as F
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
# Tensor = torch.Tensor
|
||||
# from typing import Callable, List, Optional, Tuple, Union
|
||||
|
||||
|
@ -21,6 +21,10 @@ from typing import Tuple
|
||||
from typing import Union
|
||||
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
import torch.nn as nn
|
||||
from torch import Tensor
|
||||
|
||||
|
@ -10,6 +10,10 @@ from typing import Tuple
|
||||
from typing import Union
|
||||
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from AR.modules.activation import MultiheadAttention
|
||||
from AR.modules.scaling import BalancedDoubleSwish
|
||||
from torch import nn
|
||||
|
@ -2,6 +2,10 @@ import time
|
||||
|
||||
import librosa
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
import torch.nn.functional as F
|
||||
import soundfile as sf
|
||||
import logging
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,9 @@
|
||||
import math
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
import math
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch.nn import functional as F
|
||||
|
||||
|
||||
|
@ -34,6 +34,10 @@ import typing as tp
|
||||
|
||||
from einops import rearrange, repeat
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
from tqdm import tqdm
|
||||
|
@ -2,6 +2,10 @@ import math
|
||||
import os
|
||||
import random
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
import torch.nn.functional as F
|
||||
import torch.utils.data
|
||||
|
@ -1,6 +1,10 @@
|
||||
import copy
|
||||
import math
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
import math
|
||||
import numpy as np
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
# This is Multi-reference timbre encoder
|
||||
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
from torch.nn.utils import remove_weight_norm, weight_norm
|
||||
from module.attentions import MultiHeadAttention
|
||||
|
@ -11,6 +11,10 @@ import math
|
||||
import typing as tp
|
||||
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch import nn
|
||||
|
||||
from module.core_vq import ResidualVectorQuantization
|
||||
|
@ -1,4 +1,8 @@
|
||||
import torch
|
||||
try:
|
||||
import torch_musa
|
||||
except ImportError:
|
||||
pass
|
||||
from torch.nn import functional as F
|
||||
|
||||
import numpy as np
|
||||
|
Loading…
x
Reference in New Issue
Block a user