[GH-ISSUE #4839] [Feature]: Make Storyboard animation planning use the generated illustration #2674

Closed
opened 2026-10-21 05:52:44 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @thetopham on GitHub (Aug 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4839

Originally assigned to: @thetopham on GitHub.

What problem does this solve?

Storyboard animation planning currently happens before the keyframe illustration exists. The selected Animation Planner receives the story beat, narration, and text context, so it plans from the intended composition rather than the frame that was actually generated.

This can produce animation prompts that contradict the real first frame—for example, assuming a raised sword when it is lowered, a three-quarter face when the image is profile, two visible characters when only one is framed clearly, or a wide shot when the result is a close-up.

Current Engine orchestration confirms the gap:

  • buildStoryboardIllustratorMessages(...) selects the animation-planner preset before image generation and gives it narration/game context, not generated image pixels.
  • After the illustration is saved, buildStoryboardGalleryAnimatePrompt(...) formats the video prompt from the planned text and the gallery image's stored text prompt.
  • The actual image is passed to the video provider as referenceImage, but it is not first analyzed by the Animation Planner.

The result is effectively “animate what the keyframe was expected to be” instead of “animate what the keyframe actually is.”

Proposed solution

Use a two-pass animation-planning pipeline:

  1. Before illustration generation, create an abstract motion intent from the storyboard beat:
    • primary action;
    • emotional arc;
    • desired camera feel;
    • ending beat;
    • duration.
  2. Generate and persist the keyframe illustration.
  3. After the image exists, run an image-capable Animation Planner with:
    • the actual generated illustration as multimodal image input;
    • the abstract motion intent;
    • the relevant narration/beat and duration constraints.
  4. Produce the final animation plan and video prompt from the observed frame:
    • actual visible subjects;
    • exact starting pose at T=0;
    • camera framing;
    • important object positions;
    • feasible subject motion;
    • feasible camera motion;
    • continuity constraints and ending pose.
  5. Pass that refined prompt, together with the same illustration as the first-frame reference, to video generation.

The illustration-aware pass should be able to classify the frame as:

  • suitable for the intended motion;
  • suitable only after simplifying/downgrading motion;
  • best handled with subtle motion;
  • unsuitable and worth offering for illustration regeneration.

Do not silently spend another image-generation request. If regeneration is recommended, surface that outcome for explicit user approval or an existing opt-in regeneration policy.

If the selected planner connection does not support image input, or the vision pass fails, preserve the completed illustration and fall back to the current text-based animation prompt with a visible/debuggable warning rather than failing the entire storyboard.

Alternatives considered

  • Keep planning entirely before image generation. This is faster, but it cannot account for composition drift introduced by the image model.
  • Let the video model infer everything from the first-frame reference. The video provider still benefits from a prompt grounded in the real pose, crop, visible subjects, and feasible motion; relying on implicit provider interpretation makes behavior less consistent across providers.
  • Send only the generated illustration prompt back to the planner. The text describes the intended frame, not necessarily the generated pixels, so it does not close the mismatch.
  • Automatically regenerate every frame judged unsuitable. This may improve animation quality but can create unexpected cost and latency, so regeneration should require explicit approval or an opt-in policy.

Additional context

Suggested acceptance criteria:

  • The final Storyboard animation-planner call occurs only after its keyframe illustration has been generated and saved.
  • The planner receives the actual illustration as image input, not only its prompt, filename, ID, or URL text.
  • The final video prompt is derived from both the abstract beat intent and image-grounded observations.
  • The plan explicitly grounds visible subjects, T=0 pose, framing, object placement, feasible motion, and camera constraints.
  • The refined prompt is saved on the storyboard keyframe and is the prompt sent to the video provider.
  • The same generated illustration remains the provider's first-frame/reference image.
  • Unsupported vision input, planner failure, cancellation, and timeout preserve the generated still and use a clear fallback/error path.
  • Tests prove call ordering and verify that the image-aware planner payload contains image content.
  • A regression test proves the video provider receives the refined prompt rather than the pre-image motion intent.
  • Debug logging exposes the abstract intent, image-aware planner response, selected fallback path, and final provider prompt without logging raw image bytes.

Implementation ownership is Marinara Engine because this changes host orchestration, provider/model routing, stored storyboard state, and prompt assembly. Downloadable Storyboard package prompt content may need a coordinated contract update only if new planner variables or output fields are introduced.

Initial scope should cover the shared Storyboard keyframe animation path. Ordinary manual Gallery/Scene Video animation can reuse the new image-analysis primitive later, but does not need to block this issue.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @thetopham on GitHub (Aug 10, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4839 Originally assigned to: @thetopham on GitHub. ## What problem does this solve? Storyboard animation planning currently happens before the keyframe illustration exists. The selected Animation Planner receives the story beat, narration, and text context, so it plans from the intended composition rather than the frame that was actually generated. This can produce animation prompts that contradict the real first frame—for example, assuming a raised sword when it is lowered, a three-quarter face when the image is profile, two visible characters when only one is framed clearly, or a wide shot when the result is a close-up. Current Engine orchestration confirms the gap: - `buildStoryboardIllustratorMessages(...)` selects the animation-planner preset before image generation and gives it narration/game context, not generated image pixels. - After the illustration is saved, `buildStoryboardGalleryAnimatePrompt(...)` formats the video prompt from the planned text and the gallery image's stored text prompt. - The actual image is passed to the video provider as `referenceImage`, but it is not first analyzed by the Animation Planner. The result is effectively “animate what the keyframe was expected to be” instead of “animate what the keyframe actually is.” ## Proposed solution Use a two-pass animation-planning pipeline: 1. Before illustration generation, create an abstract motion intent from the storyboard beat: - primary action; - emotional arc; - desired camera feel; - ending beat; - duration. 2. Generate and persist the keyframe illustration. 3. After the image exists, run an image-capable Animation Planner with: - the actual generated illustration as multimodal image input; - the abstract motion intent; - the relevant narration/beat and duration constraints. 4. Produce the final animation plan and video prompt from the observed frame: - actual visible subjects; - exact starting pose at T=0; - camera framing; - important object positions; - feasible subject motion; - feasible camera motion; - continuity constraints and ending pose. 5. Pass that refined prompt, together with the same illustration as the first-frame reference, to video generation. The illustration-aware pass should be able to classify the frame as: - suitable for the intended motion; - suitable only after simplifying/downgrading motion; - best handled with subtle motion; - unsuitable and worth offering for illustration regeneration. Do not silently spend another image-generation request. If regeneration is recommended, surface that outcome for explicit user approval or an existing opt-in regeneration policy. If the selected planner connection does not support image input, or the vision pass fails, preserve the completed illustration and fall back to the current text-based animation prompt with a visible/debuggable warning rather than failing the entire storyboard. ## Alternatives considered - Keep planning entirely before image generation. This is faster, but it cannot account for composition drift introduced by the image model. - Let the video model infer everything from the first-frame reference. The video provider still benefits from a prompt grounded in the real pose, crop, visible subjects, and feasible motion; relying on implicit provider interpretation makes behavior less consistent across providers. - Send only the generated illustration prompt back to the planner. The text describes the intended frame, not necessarily the generated pixels, so it does not close the mismatch. - Automatically regenerate every frame judged unsuitable. This may improve animation quality but can create unexpected cost and latency, so regeneration should require explicit approval or an opt-in policy. ## Additional context Suggested acceptance criteria: - [ ] The final Storyboard animation-planner call occurs only after its keyframe illustration has been generated and saved. - [ ] The planner receives the actual illustration as image input, not only its prompt, filename, ID, or URL text. - [ ] The final video prompt is derived from both the abstract beat intent and image-grounded observations. - [ ] The plan explicitly grounds visible subjects, T=0 pose, framing, object placement, feasible motion, and camera constraints. - [ ] The refined prompt is saved on the storyboard keyframe and is the prompt sent to the video provider. - [ ] The same generated illustration remains the provider's first-frame/reference image. - [ ] Unsupported vision input, planner failure, cancellation, and timeout preserve the generated still and use a clear fallback/error path. - [ ] Tests prove call ordering and verify that the image-aware planner payload contains image content. - [ ] A regression test proves the video provider receives the refined prompt rather than the pre-image motion intent. - [ ] Debug logging exposes the abstract intent, image-aware planner response, selected fallback path, and final provider prompt without logging raw image bytes. Implementation ownership is Marinara Engine because this changes host orchestration, provider/model routing, stored storyboard state, and prompt assembly. Downloadable Storyboard package prompt content may need a coordinated contract update only if new planner variables or output fields are introduced. Initial scope should cover the shared Storyboard keyframe animation path. Ordinary manual Gallery/Scene Video animation can reuse the new image-analysis primitive later, but does not need to block this issue. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@thetopham commented on GitHub (Aug 10, 2026):

Implementation started by @thetopham on agent/4839-illustration-aware-animation, based on current origin/staging. Scope is the narrow Engine orchestration change: refine each Storyboard video prompt from the generated illustration after image generation, with the current text-based prompt as fallback. A draft PR will follow the first implementation commit.

<!-- gh-comment-id:5235209758 --> @thetopham commented on GitHub (Aug 10, 2026): Implementation started by @thetopham on `agent/4839-illustration-aware-animation`, based on current `origin/staging`. Scope is the narrow Engine orchestration change: refine each Storyboard video prompt from the generated illustration after image generation, with the current text-based prompt as fallback. A draft PR will follow the first implementation commit.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2674
No description provided.