Skip to content

Add native MP4/Video output support #232

Description

@girzai

Currently worker-comfyui only returns generated images (output.images) as Base64 or S3 URLs. Modern ComfyUI workflows (Wan, HunyuanVideo, LTX-Video, CogVideoX, Cosmos, etc.) commonly generate MP4 videos, but these outputs are ignored by the worker.

This PR adds first-class support for video outputs while remaining fully backward compatible.

Motivation

Many recent ComfyUI workflows generate videos instead of images using nodes such as:

VHS Video Combine
SaveVideo
SaveWEBM
FFmpeg Video Output
Other custom video output nodes

The worker currently only scans for image files, making it impossible to use these workflows through the serverless API without custom modifications.

Implementation

Detect video outputs in the ComfyUI output directory.
Support common video extensions:
.mp4
.webm
.mov
.mkv (optional)
Reuse the existing upload pipeline:
Base64 output
S3 upload
Return videos under a new output.videos field.
Preserve existing image behavior with no breaking changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions