mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 18:10:08 +00:00
[Bug] SaveAnimatedPNG node does not display generated APNG (#4197)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -847,10 +847,13 @@ export const useLitegraphService = () => {
|
||||
|
||||
const isAnimatedWebp =
|
||||
this.animatedImages &&
|
||||
// @ts-expect-error fixme ts strict error
|
||||
output.images.some((img) => img.filename?.includes('webp'))
|
||||
output?.images?.some((img) => img.filename?.includes('webp'))
|
||||
const isAnimatedPng =
|
||||
this.animatedImages &&
|
||||
output?.images?.some((img) => img.filename?.includes('png'))
|
||||
const isVideo =
|
||||
(this.animatedImages && !isAnimatedWebp) || isVideoNode(this)
|
||||
(this.animatedImages && !isAnimatedWebp && !isAnimatedPng) ||
|
||||
isVideoNode(this)
|
||||
if (isVideo) {
|
||||
useNodeVideo(this).showPreview()
|
||||
} else {
|
||||
|
||||
@@ -21,7 +21,10 @@ const createOutputs = (
|
||||
): ExecutedWsMessage['output'] => {
|
||||
return {
|
||||
images: filenames.map((image) => ({ type, ...parseFilePath(image) })),
|
||||
animated: filenames.map((image) => isAnimated && image.endsWith('.webp'))
|
||||
animated: filenames.map(
|
||||
(image) =>
|
||||
isAnimated && (image.endsWith('.webp') || image.endsWith('.png'))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user