From 8eec10dced5a99a8e157b0b7a6b6600cae7af78f 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 7b3cca27d..98b70c6b5 100644 --- a/src/services/litegraphService.ts +++ b/src/services/litegraphService.ts @@ -402,7 +402,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()