Add output to SaveAnimatedWEBP and SaveAnimatedPNG

This commit is contained in:
Alexis Rolland 2026-05-13 13:27:46 +08:00
parent adf2ba0e60
commit d05f18410a

View File

@ -204,11 +204,13 @@ class SaveAnimatedWEBP(IO.ComfyNode):
],
hidden=[IO.Hidden.prompt, IO.Hidden.extra_pnginfo],
is_output_node=True,
outputs=[IO.Image.Output()]
)
@classmethod
def execute(cls, images, fps, filename_prefix, lossless, quality, method, num_frames=0) -> IO.NodeOutput:
return IO.NodeOutput(
images,
ui=UI.ImageSaveHelper.get_save_animated_webp_ui(
images=images,
filename_prefix=filename_prefix,
@ -220,8 +222,6 @@ class SaveAnimatedWEBP(IO.ComfyNode):
)
)
save_images = execute # TODO: remove
class SaveAnimatedPNG(IO.ComfyNode):
@ -238,11 +238,13 @@ class SaveAnimatedPNG(IO.ComfyNode):
],
hidden=[IO.Hidden.prompt, IO.Hidden.extra_pnginfo],
is_output_node=True,
outputs=[IO.Image.Output()]
)
@classmethod
def execute(cls, images, fps, compress_level, filename_prefix="ComfyUI") -> IO.NodeOutput:
return IO.NodeOutput(
images,
ui=UI.ImageSaveHelper.get_save_animated_png_ui(
images=images,
filename_prefix=filename_prefix,
@ -252,8 +254,6 @@ class SaveAnimatedPNG(IO.ComfyNode):
)
)
save_images = execute # TODO: remove
class ImageStitch(IO.ComfyNode):
"""Upstreamed from https://github.com/kijai/ComfyUI-KJNodes"""