You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return {"ui": {"images": results, "animated": (True,)}} # TODO: frontend side
webp and webm need separate handling so animated doesn't help much for the frontend.
In general, the client wants to know the mime type before the request for the resource is actually made, but can only infer from the outputs being in either images or audio or from filename. To reduce burden on client and improve API, either add a field to denote mime type or add videos field.
Feature Idea
Currently there is an
animated
field being used for webm and animated webp:ComfyUI/comfy_extras/nodes_images.py
Line 191 in 1650cda
ComfyUI/comfy_extras/nodes_images.py
Line 138 in 1650cda
ComfyUI/comfy_extras/nodes_video.py
Line 74 in 5d84607
webp and webm need separate handling so
animated
doesn't help much for the frontend.In general, the client wants to know the mime type before the request for the resource is actually made, but can only infer from the outputs being in either
images
oraudio
or from filename. To reduce burden on client and improve API, either add a field to denote mime type or addvideos
field.videos
field for quick solution:results: list[FileLocator] = [{ "filename": file, "subfolder": subfolder, "type": self.type }] + return {"ui": {"videos": results, "animated": (True,)}}
images
:results: list[FileLocator] = [{ "filename": file, "subfolder": subfolder, "type": self.type + "mimeType" : "video/webm" }] return {"ui": {"images": results, "animated": (True,)}}
Existing Solutions
No response
Other
No response
The text was updated successfully, but these errors were encountered: