From caaf0507283b36e32787caac6ee22e91a3390c5d Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 6 Mar 2025 09:19:48 -0700 Subject: [PATCH] Fix animated webp output preview (#2897) --- src/services/litegraphService.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services/litegraphService.ts b/src/services/litegraphService.ts index 01ab8489a..f5076e633 100644 --- a/src/services/litegraphService.ts +++ b/src/services/litegraphService.ts @@ -394,7 +394,12 @@ export const useLitegraphService = () => { if (isNewOutput || isNewPreview) { this.animatedImages = output?.animated?.find(Boolean) - if (this.animatedImages || isVideoNode(this)) { + const isAnimatedWebp = + this.animatedImages && + output.images.some((img) => img.filename?.includes('webp')) + const isVideo = + (this.animatedImages && !isAnimatedWebp) || isVideoNode(this) + if (isVideo) { useNodeVideo(this).showPreview() } else { useNodeImage(this).showPreview()