Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify content type in executed output messages #7111

Open
christian-byrne opened this issue Mar 6, 2025 · 0 comments
Open

Specify content type in executed output messages #7111

christian-byrne opened this issue Mar 6, 2025 · 0 comments
Labels
Feature A new feature to add to ComfyUI.

Comments

@christian-byrne
Copy link
Contributor

christian-byrne commented Mar 6, 2025

Feature Idea

Currently there is an animated field being used for webm and animated webp:

return { "ui": { "images": results, "animated": (True,)} }

return { "ui": { "images": results, "animated": (animated,) } }

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.

  1. Just add videos field for quick solution:
        results: list[FileLocator] = [{
            "filename": file,
            "subfolder": subfolder,
            "type": self.type
        }]

+       return {"ui": {"videos": results, "animated": (True,)}}
  1. Use a field to denote mime type and keep everything in 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

@christian-byrne christian-byrne added the Feature A new feature to add to ComfyUI. label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A new feature to add to ComfyUI.
Projects
None yet
Development

No branches or pull requests

1 participant