mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Fix animated webp output preview (#2897)
This commit is contained in:
committed by
Chenlei Hu
parent
95a5736da0
commit
8eec10dced
@@ -402,7 +402,12 @@ export const useLitegraphService = () => {
|
|||||||
if (isNewOutput || isNewPreview) {
|
if (isNewOutput || isNewPreview) {
|
||||||
this.animatedImages = output?.animated?.find(Boolean)
|
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()
|
useNodeVideo(this).showPreview()
|
||||||
} else {
|
} else {
|
||||||
useNodeImage(this).showPreview()
|
useNodeImage(this).showPreview()
|
||||||
|
|||||||
Reference in New Issue
Block a user