Fix animated webp output preview (#2897)

This commit is contained in:
Christian Byrne
2025-03-06 09:19:48 -07:00
committed by GitHub
parent 367a1c63a5
commit caaf050728

View File

@@ -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()