Files
comfyui_o1key/docs/decisions/0008-native-video-save-outputs.md
Jony ba920f2b66 Publish current ComfyUI O1Key code baseline
Replace the prior release tree with the current plugin, frontend, tests, and documentation. Document retired node IDs and the public Gitea update source.
2026-09-24 19:56:48 +08:00

2.8 KiB

0008: Native save nodes for panel video outputs

  • Status: Accepted
  • Date: 2026-09-12
  • Owners: Maintainers
  • Supersedes: ADR 0007 for result presentation

Context

The dedicated O1keyVideoResult made every panel submission visible and recoverable, but duplicated capabilities already provided by ComfyUI's native save nodes and occupied a large result card. Users expect the generator's outputs to be visible through ordinary graph connections. Saved workflows containing the released result node must remain loadable, and native graph execution must never submit a second paid generation request.

Decision

O1keyVideoGenerator exposes VIDEO followed by LAST_FRAME. Every panel submission creates and connects one native SaveVideo; it additionally creates and connects one native SaveImage when the submitted return_last_frame value is enabled. The independent background job keeps saving the provider result atomically, then dispatches its safe file descriptor to the exact native save node for preview. Batch identity, generator association, terminal state, and safe descriptors are stored on the native node so workflow reload can restore completed previews or resume polling unfinished jobs.

The generator's appended result-manifest widgets allow native execution to resolve the latest completed local video and image without contacting the provider. O1keyVideoResult remains registered and executable as a deprecated compatibility node for existing workflows, but the frontend no longer creates it.

Consequences

New jobs use familiar native save nodes and visible typed connections. Returning a last frame produces two clearly separated native outputs. Repeated clicks remain independent and may create multiple save-node pairs. The panel job has already persisted the artifact before its preview is dispatched, so executing a native save node again is unnecessary and may create another copy of the generator's latest completed output.

Alternatives considered

  • Remove the released result-node registration: rejected because saved workflows would fail to load.
  • Route paid video generation through ComfyUI's native queue: rejected because it would remove immediate independent submissions and risk duplicate provider calls.
  • Reuse one native save node across every click: rejected because concurrent jobs would overwrite each other's visible result association.

Validation

tests/test_o1key_video_generator.py verifies append-only manifest inputs, typed generator outputs, side-effect-free local resolution, and deprecated result compatibility. tests/test_o1key_video_generator_frontend.mjs verifies native node creation, conditional last-frame saving, typed connections, descriptor dispatch, recovery, and the absence of new O1keyVideoResult creation or native queue submission.