Skip to content

Keep the ComfyUI workflow in saved videos and sharing exports (0.2.2) - #65

Merged
KBRASK merged 1 commit into
mainfrom
fix/workflow-in-video
Oct 6, 2026
Merged

KBRASK merged 1 commit into
mainfrom
fix/workflow-in-video

Conversation

@KBRASK

@KBRASK KBRASK commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #64.

Dropping a FreeVideo video on the ComfyUI canvas did nothing, so a result could not restore its workflow or be compared with another run's settings. The workflow was only saved as workflow.json next to the video. Release 0.2.2.

Saved videos

  • After a successful generation the MP4 is remuxed, with streams copied rather than re-encoded. The prompt and workflow are written as QuickTime metadata keys, with moov first.
  • This is the layout ComfyUI's own video nodes write and its frontend reads when a file is dropped on the canvas.
  • --disable-metadata is respected. The file is rewritten before the result cache records its size and hash. Any failure keeps the original video.

Sharing exports

  • The sharing video carries the same metadata. The sharing image gets it as PNG tEXt chunks, the way ComfyUI saves images.
  • Videos saved before this change use the workflow.json next to them.
  • The export cache key moves to v2, so earlier exports without the workflow are made again.

Checks

  • New tests: tags in the place the frontend reads, moov before mdat, packets byte-identical, failures keep the file. The bridge, result cache, library and release notes tests pass.
  • Sharing browser test, in both languages, with a real video: the image and video exports carry the workflow, and the original is unchanged.
  • On the Windows test machine:
    • ComfyUI's PyAV 19 rewrote a copy of a real output.
    • Dropping that copy on ComfyUI's canvas restored the graph with the saved prompt and seed.
    • The same frontend reads the workflow from both sharing exports.

Dropping a FreeVideo result on the ComfyUI canvas did nothing: the workflow
was saved only as workflow.json next to the video.

- After a successful generation the MP4 is remuxed, streams copied rather than
  re-encoded, with the prompt and workflow as QuickTime metadata keys and moov
  first. That is the layout ComfyUI's own video nodes write and its frontend
  reads on drop. --disable-metadata is respected, the file is rewritten before
  the result cache records its size and hash, and any failure keeps the
  original video.
- The sharing video carries the same metadata, and the sharing image gets it
  as PNG tEXt chunks. Videos saved earlier use the workflow.json next to them.
  The export cache key moves to v2 so earlier exports are made again.

Release 0.2.2.
@KBRASK
KBRASK merged commit 399512e into main Oct 6, 2026
4 checks passed
@KBRASK
KBRASK deleted the fix/workflow-in-video branch October 6, 2026 03:08
@KBRASK

KBRASK commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

#64

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add the workflow in the generated videos

1 participant