mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-07 03:52:32 +08:00
Compare commits
4 Commits
e57b760ded
...
575d5e065c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
575d5e065c | ||
|
|
68aa3e8507 | ||
|
|
3e57391913 | ||
|
|
98756ecf5e |
@ -271,7 +271,10 @@ class LoadAudio(IO.ComfyNode):
|
||||
inputs=[
|
||||
IO.Combo.Input("audio", upload=IO.UploadType.audio, options=sorted(files)),
|
||||
],
|
||||
outputs=[IO.Audio.Output()],
|
||||
outputs=[
|
||||
IO.Audio.Output(),
|
||||
IO.Float.Output(display_name="duration"),
|
||||
],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@ -279,7 +282,7 @@ class LoadAudio(IO.ComfyNode):
|
||||
audio_path = folder_paths.get_annotated_filepath(audio)
|
||||
waveform, sample_rate = load(audio_path)
|
||||
audio = {"waveform": waveform.unsqueeze(0), "sample_rate": sample_rate}
|
||||
return IO.NodeOutput(audio)
|
||||
return IO.NodeOutput(audio, waveform.shape[-1] / sample_rate)
|
||||
|
||||
@classmethod
|
||||
def fingerprint_inputs(cls, audio):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user