Skip to content

Offer to add workflows to earlier videos, with backups (0.2.3) - #70

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

KBRASK merged 1 commit into
mainfrom
fix/workflow-backfill

Conversation

@KBRASK

@KBRASK KBRASK commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #64.

Videos made before v0.2.2 keep their workflow only in workflow.json. This offers to add it to them, safely and only when the user asks. Release 0.2.3.

Asked first

  • Nothing runs at startup.
  • Creations shows how many earlier videos can get their workflow and the space their backups take, with Add workflows and Don't ask again.
  • Adding runs in the background, then reports how many videos changed and where the originals are kept. "Don't ask again" is remembered by the server.
  • --disable-metadata hides the offer.

Changes nothing it cannot verify

  • A video is skipped when any of these holds:
    • its workflow.json has no canvas workflow (requests queued through the API save an empty one);
    • it already has a workflow;
    • its request is still running;
    • free space is under twice its size plus 512 MiB;
    • it has anything besides audio and video streams;
    • a backup already exists.
  • The rewrite replaces the original only after every packet of every stream matches byte for byte and the workflow reads back.
  • The original is kept as video.before-workflow.mp4: a hard link, or a size-checked copy.
  • The result cache is updated, so saved results stay reusable.
  • New videos get the same check. Sharing exports ignore an empty workflow.json.

Checks

  • Unit tests: rewriting and skipping, a mismatched rewrite keeping the original, low disk, an existing backup, and the candidate count.
  • A browser test for the Creations offer, dismissal and confirmed run, in English and Chinese.
  • On the Windows test machine, with copies of real earlier outputs:
    • the video with a canvas workflow was rewritten, and its backup matches the original's SHA-256;
    • dropping it on that ComfyUI's canvas restored the prompt and seed;
    • the two API-queued videos stayed byte-identical, with no backup.

Videos made before v0.2.2 keep their workflow only in workflow.json. Creations
now offers to add it to them, with the number of videos and the space their
backups take, and nothing changes until the user confirms ("Don't ask again"
is remembered).

Each video is skipped unless it is safe to rewrite: its workflow.json must
hold a canvas workflow, the request must have finished, there must be room for
a copy plus 512 MiB, it must have only audio and video streams, and no earlier
backup may exist. The rewrite replaces the original only after every packet of
every stream matches it byte for byte and the workflow reads back. The original
is kept as video.before-workflow.mp4, and the result cache is updated so saved
results stay reusable. New videos get the same check, and sharing exports
ignore an empty workflow.json.

Release 0.2.3.
@KBRASK
KBRASK merged commit e7eb663 into main Oct 6, 2026
4 checks passed
@KBRASK
KBRASK deleted the fix/workflow-backfill branch October 6, 2026 04:04
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