Make torchaudio not a hard requirement. (#7987)
Some platforms can't install it apparently so if it's not there it should only break models that actually use it.
This commit is contained in:
parent
56b6ee6754
commit
fd08e39588
@ -1,7 +1,12 @@
|
|||||||
# Original from: https://github.com/ace-step/ACE-Step/blob/main/music_dcae/music_dcae_pipeline.py
|
# Original from: https://github.com/ace-step/ACE-Step/blob/main/music_dcae/music_dcae_pipeline.py
|
||||||
import torch
|
import torch
|
||||||
from .autoencoder_dc import AutoencoderDC
|
from .autoencoder_dc import AutoencoderDC
|
||||||
import torchaudio
|
import logging
|
||||||
|
try:
|
||||||
|
import torchaudio
|
||||||
|
except:
|
||||||
|
logging.warning("torchaudio missing, ACE model will be broken")
|
||||||
|
|
||||||
import torchvision.transforms as transforms
|
import torchvision.transforms as transforms
|
||||||
from .music_vocoder import ADaMoSHiFiGANV1
|
from .music_vocoder import ADaMoSHiFiGANV1
|
||||||
|
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
from torchaudio.transforms import MelScale
|
import logging
|
||||||
|
try:
|
||||||
|
from torchaudio.transforms import MelScale
|
||||||
|
except:
|
||||||
|
logging.warning("torchaudio missing, ACE model will be broken")
|
||||||
|
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
|
|
||||||
class LinearSpectrogram(nn.Module):
|
class LinearSpectrogram(nn.Module):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user