Files
comfyui_o1key/docs/decisions/0007-panel-driven-video-jobs.md
T
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

3.6 KiB

0007: Panel-driven independent video jobs

  • Status: Superseded by ADR 0008
  • Date: 2026-09-07
  • Owners: Maintainers

Context

Video generation is asynchronous and long-running. The unified video node must support repeated clicks that run independently, while saved workflows still need a durable node that can preview a completed artifact and feed native ComfyUI video consumers. The user explicitly does not want these generation requests represented by ComfyUI's native queue.

Decision

O1keyVideoGenerator is a panel-only V3 node with no outputs and a side-effect-free native execute. Every click creates an O1keyVideoResult node and submits an independent server-side job through /o1key/video/jobs. Every accepted job starts immediately; the plugin does not impose a semaphore, concurrency ceiling, or internal waiting slot on video-job scheduling. A job may still bound its own prerequisite media preparation. Provider-side quotas and rate limits remain authoritative.

The result node stores only safe ComfyUI file descriptors and bounded status/request metadata. Once a job completes, its native execution resolves the already-downloaded file and emits VIDEO plus optional LAST_FRAME; it cannot initiate or retry generation. Existing released video nodes and their mapping keys remain registered unchanged.

For Seedance automatic mode, both domestic and overseas routes use the same material-service boundary as SeedanceElementCreate; the route selects the Doubao or HC namespace. Material preparation is bounded to three concurrent items without limiting independent video jobs. Safe resolved IDs and content fingerprints may be persisted so retries and repeated content reuse existing Active material, but temporary upload URLs and local paths may not be persisted.

Prompt assistance is a separate, non-job operation at /o1key/video/prompt-write. It uses a dedicated video default preset rather than the image preset. Only sanitized input-image descriptors and scalar generation context cross the browser/server boundary; reference video and audio are represented by counts, not media payloads. This operation does not create a result node or enter either job system.

Consequences

Repeated submissions remain available while earlier videos run, and every job has its own visible result node, status, cancellation, and retry lifecycle. Native queue controls do not display or control these jobs. A burst of clicks can therefore create the same number of simultaneous provider requests and may encounter upstream rate limits. Cancelling after provider acceptance cannot retract the remote request. New providers must be added through the shared catalog/job adapter boundary rather than by adding paid work to the generator node's execute method.

Alternatives considered

  • Represent jobs in ComfyUI's native queue: rejected because it conflicts with the required click-driven independent workflow.
  • Return VIDEO directly from the generator: rejected because native execution would either duplicate paid work or require a blocking queue run.
  • Reuse one result node for all clicks: rejected because concurrent completions could overwrite one another and obscure per-request state.

Validation

tests/test_o1key_video_generator.py verifies the side-effect-free schema, Seedance matrix and validation, request-body roles, safe descriptors, and immediate unbounded independent execution. tests/test_o1key_video_generator_frontend.mjs verifies one-result-per-click wiring, the jobs API/event bridge, repeated-submit behavior, and absence of native queue submission calls.