mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-26 14:20:27 +08:00
For now, make torchaudio optional, because this package requires a lot of work to prevent weird dependency issues
This commit is contained in:
parent
4e73eb7986
commit
3b35aa7846
@ -1,4 +1,3 @@
|
|||||||
import torchaudio
|
|
||||||
import torch
|
import torch
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
from comfy.cmd import folder_paths
|
from comfy.cmd import folder_paths
|
||||||
@ -69,6 +68,8 @@ class SaveAudio:
|
|||||||
CATEGORY = "_for_testing/audio"
|
CATEGORY = "_for_testing/audio"
|
||||||
|
|
||||||
def save_audio(self, audio, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None):
|
def save_audio(self, audio, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None):
|
||||||
|
import torchaudio
|
||||||
|
|
||||||
filename_prefix += self.prefix_append
|
filename_prefix += self.prefix_append
|
||||||
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir)
|
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir)
|
||||||
results = list()
|
results = list()
|
||||||
@ -99,6 +100,8 @@ class LoadAudio:
|
|||||||
FUNCTION = "load"
|
FUNCTION = "load"
|
||||||
|
|
||||||
def load(self, audio):
|
def load(self, audio):
|
||||||
|
import torchaudio
|
||||||
|
|
||||||
audio_path = folder_paths.get_annotated_filepath(audio)
|
audio_path = folder_paths.get_annotated_filepath(audio)
|
||||||
waveform, sample_rate = torchaudio.load(audio_path)
|
waveform, sample_rate = torchaudio.load(audio_path)
|
||||||
multiplier = 1.0
|
multiplier = 1.0
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
torch
|
torch
|
||||||
torchvision
|
torchvision
|
||||||
torchaudio
|
|
||||||
torchdiffeq>=0.2.3
|
torchdiffeq>=0.2.3
|
||||||
torchsde>=0.2.6
|
torchsde>=0.2.6
|
||||||
einops>=0.6.0
|
einops>=0.6.0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user