Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
628f0b8e
Commit
628f0b8e
authored
Jul 07, 2024
by
comfyanonymous
Browse files
Move audio nodes out of _for_testing.
parent
2dc84d14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
comfy_extras/nodes_audio.py
comfy_extras/nodes_audio.py
+5
-6
No files found.
comfy_extras/nodes_audio.py
View file @
628f0b8e
...
...
@@ -19,7 +19,7 @@ class EmptyLatentAudio:
RETURN_TYPES
=
(
"LATENT"
,)
FUNCTION
=
"generate"
CATEGORY
=
"
_for_testing
/audio"
CATEGORY
=
"
latent
/audio"
def
generate
(
self
,
seconds
):
batch_size
=
1
...
...
@@ -34,7 +34,7 @@ class VAEEncodeAudio:
RETURN_TYPES
=
(
"LATENT"
,)
FUNCTION
=
"encode"
CATEGORY
=
"
_for_testing
/audio"
CATEGORY
=
"
latent
/audio"
def
encode
(
self
,
vae
,
audio
):
sample_rate
=
audio
[
"sample_rate"
]
...
...
@@ -53,7 +53,7 @@ class VAEDecodeAudio:
RETURN_TYPES
=
(
"AUDIO"
,)
FUNCTION
=
"decode"
CATEGORY
=
"
_for_testing
/audio"
CATEGORY
=
"
latent
/audio"
def
decode
(
self
,
vae
,
samples
):
audio
=
vae
.
decode
(
samples
[
"samples"
]).
movedim
(
-
1
,
1
)
...
...
@@ -132,7 +132,7 @@ class SaveAudio:
OUTPUT_NODE
=
True
CATEGORY
=
"
_for_testing/
audio"
CATEGORY
=
"audio"
def
save_audio
(
self
,
audio
,
filename_prefix
=
"ComfyUI"
,
prompt
=
None
,
extra_pnginfo
=
None
):
filename_prefix
+=
self
.
prefix_append
...
...
@@ -195,7 +195,7 @@ class LoadAudio:
]
return
{
"required"
:
{
"audio"
:
(
sorted
(
files
),
{
"audio_upload"
:
True
})}}
CATEGORY
=
"
_for_testing/
audio"
CATEGORY
=
"audio"
RETURN_TYPES
=
(
"AUDIO"
,
)
FUNCTION
=
"load"
...
...
@@ -203,7 +203,6 @@ class LoadAudio:
def
load
(
self
,
audio
):
audio_path
=
folder_paths
.
get_annotated_filepath
(
audio
)
waveform
,
sample_rate
=
torchaudio
.
load
(
audio_path
)
multiplier
=
1.0
audio
=
{
"waveform"
:
waveform
.
unsqueeze
(
0
),
"sample_rate"
:
sample_rate
}
return
(
audio
,
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment