Skip to content

Make a clip from a prompt alone: generate its picture, then animate it - #8

Merged
davior merged 1 commit into
mainfrom
claude/jolly-newton-lf35p8
Oct 21, 2026
Merged

davior merged 1 commit into
mainfrom
claude/jolly-newton-lf35p8

Conversation

@davior

@davior davior commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Why

GAM's video models all start from a picture, and GAM has no text-to-video. So a clip placeholder couldn't be generated unless the video already had a picture to animate.

What

In the Generate dialog, Made from now offers "A new picture, made from the prompt". It's the default when the video has no pictures. Choosing it shows:

  • an optional prompt for the picture (empty uses the clip's prompt);
  • a picture model, taken from GAM's text-to-image models;
  • a price covering both runs, e.g. About $0.44. When one of the prices can't be worked out ahead of time, it shows the two list prices instead.

One click, two runs, one row (generation/service.py):

  • start(..., make_picture=True) starts the picture in GAM and stores the clip's run (model, prompt, params) in generation.then.
  • refresh already follows each job whenever the project's generations are read. When the picture is done, it starts the clip from that picture on the same row and clears then. GVC still needs no worker of its own and stores no token.
  • While the picture is being made, the stage reads "Making the picture · …".
  • The picture's output never fills the placeholder; only the clip's does. The picture is kept as picture_id, and Try again offers it as "Picture made for this clip", so a failed clip doesn't pay for its picture twice.
  • Failures say which step failed: "Making the picture failed: …" or "The picture was made, but the clip couldn't be started: …". Stopping while the picture is being made starts no clip.

Migration: adds the nullable columns generation.then and generation.picture_id.

The assistant still never generates video, as decided before. This only changes what the Generate button can do.

Tests

  • Backend: pytest -q → 633 passed. New tests cover the picture-then-clip flow against the fake GAM, a failed picture, a clip that can't start (picture kept), and stopping before the clip starts. The migration test covers the new columns.
  • Frontend: npm test → 152 passed (a new GenerateDialog test for the new-picture path); build, lint and format:check are clean.

Not tested against a live fal.ai account.


Generated by Claude Code

GAM's video models all start from a picture and it has no text-to-video, so a
clip placeholder with no picture in the video couldn't be generated. "Made
from" now offers "A new picture, made from the prompt": GAM makes the picture
first (its own prompt and model, optional), and the clip is started from it.

One generation row follows both runs. It keeps the clip's run in `then` while
the picture is made; reading the project's generations, which already follows
each job with the reader's token, starts the clip once the picture is done.
The picture never fills the placeholder, only the clip does. It is kept as
`picture_id` and offered again on "Try again", so a failed clip doesn't pay
for its picture twice. The estimate is the two runs together.

Migration: adds `generation.then` and `generation.picture_id`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ko6G3pNhKu51bkYyUceSyg
@davior
davior marked this pull request as ready for review October 21, 2026 15:23
@davior
davior merged commit 5c07c02 into main Oct 21, 2026
3 checks 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.

2 participants