Skip to content

feat(engine): scene-level generation API (generate_clip / generate_keyframe)#35

Merged
Stanley-blik merged 1 commit into
mainfrom
feat/scene-level-engine
Jun 30, 2026
Merged

feat(engine): scene-level generation API (generate_clip / generate_keyframe)#35
Stanley-blik merged 1 commit into
mainfrom
feat/scene-level-engine

Conversation

@Stanley-blik

Copy link
Copy Markdown
Contributor

Why

The engine could only be driven autonomously via `Pipeline.run()` (whole shot list in one shot). Interactive tools — the managed studio, and self-hosters who want to regenerate a single scene — need per-scene control. This exposes the existing generation primitives as a clean public API without changing the autonomous path.

What

  • *`Generator.generate_clip(prompt, , scene_id=0, camera="", characters=None, first_frame_path=None) -> GeneratedClip` — render one scene on demand. Pass the previous clip's `last_frame_path` as `first_frame_path` to chain seamlessly (i2v conditioning); the returned clip carries its own `last_frame_path` for the next scene.
  • `KeyframeGenerator.generate_keyframe(prompt, output_path) -> Path` — produce one boundary keyframe (pin/preview/regenerate a scene boundary) without the full keyframe pass.
  • Thin public wrappers over the existing private methods — the autonomous `generate_scenes`/`Pipeline` flow is untouched.
  • Tests (`tests/test_engine.py`) + a README "Use it as a library (scene-level API)" section.

This is the foundation for the managed service to run the open core at scene granularity (interactive refinement) rather than maintaining a parallel generation path. Same engine, finer control.

Full suite: 22 passed. `ruff` clean.

…yframe)

Exposes the engine at per-scene granularity so callers can render/regenerate one
scene at a time and chain seamlessly (pass the previous clip's last_frame_path
as the next scene's first frame → i2v), instead of only the autonomous
Pipeline.run(). Same engine, finer control — for interactive tools (incl. the
managed studio) and self-hosters who want per-scene control.

- Generator.generate_clip(prompt, *, scene_id, camera, characters, first_frame_path)
- KeyframeGenerator.generate_keyframe(prompt, output_path)
- tests + README 'Use it as a library' section.
@Stanley-blik Stanley-blik self-assigned this Jun 30, 2026
@Stanley-blik Stanley-blik merged commit a31a061 into main Jun 30, 2026
1 check passed
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.

1 participant