Skip to content

Add FLUX Pro models and a per-user default model per kind - #57

Merged
davior merged 2 commits into
mainfrom
claude/sweet-noether-y46n75
Nov 2, 2026
Merged

davior merged 2 commits into
mainfrom
claude/sweet-noether-y46n75

Conversation

@davior

@davior davior commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Why

When nothing names a model, Video Creator takes the first catalogue model of the kind. The first text → image row was FLUX.1 [schnell], the draft model. So every picture GVC's assistant made, and every Generate left on its first choice, came out at draft quality. There was also no FLUX Pro model to choose instead.

What

Three FLUX Pro rows (migration b7d41e9c2a60), sorted ahead of schnell (sort order 5–7 against 10):

Endpoint Sizing Outputs Fallback price
fal-ai/flux-pro/v1.1-ultra aspect ratio 21:9…9:21 up to 4 $0.06 / image
fal-ai/flux-2-pro presets + custom size ≤ 2048², ~4 MP 1 (no num_images) $0.03 / MP
fal-ai/flux-pro/v1.1 presets + custom size ≤ 1440 a side, ×32 up to 4 $0.04 / MP
  • Field names and enums were checked against @fal-ai/client 1.11.0-alpha.6's generated endpoint types.
  • Not verified: the custom-size limits come from Black Forest Labs' and fal's documentation, because fal.ai couldn't be reached from the build environment and the schema states no bounds. An admin can change them on the row.
  • An endpoint an admin already added is left alone. The downgrade deletes only rows this revision inserted and nobody edited since.

A per-user default model per kind (app/generation/defaults.py):

  • PUT /api/settings/generation takes default_models: {kind: endpoint_id | null}. It's stored by endpoint id under the setting key default_generation_models, so no schema change is needed. An endpoint that isn't an active row of that kind is refused with 422 invalid_default_model, and nothing in the request is saved.
  • GET /api/generate/models lists the default first in its kind and flags it is_default. Because it comes first, a caller that takes the first entry (GVC, or anything older than the flag) follows the user's choice unchanged. A default that was switched off reads as no default.
  • In the UI, Settings has a "Default models" select per kind, available to every user, not only admins, and the generate form starts on the default.

Tests

  • Backend: pytest -q, 1479 passed. New tests cover the seed and its downgrade (test_migrations.py) and the defaults (test_generation_defaults.py).
  • Frontend: npm test, 456 passed. npm run build passes.

Pairs with the GVC change that lets a project choose its own models (S6). That change works without this one, but the per-user default needs this.


Generated by Claude Code

Video Creator takes the first catalogue model of a kind when nothing names one, and the
first text-to-image row was FLUX.1 [schnell], the draft model. So every picture its
assistant made, and every Generate left on its first choice, came out at draft quality.

- Seed FLUX1.1 [pro] ultra, FLUX.2 [pro] and FLUX1.1 [pro] (migration b7d41e9c2a60),
  sorted ahead of schnell. Field names and enums checked against @fal-ai/client
  1.11.0-alpha.6's endpoint types. Rows an admin already added are left alone, and the
  downgrade removes only rows nobody has edited.
- Each user can choose a default model per kind in Settings
  (`default_models` on /api/settings/generation, stored by endpoint id).
  /api/generate/models lists that model first in its kind and flags it
  `is_default`, so a caller that takes the first entry follows it unchanged.
- The generate form starts on the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2VRs3zvsfpXEqKmzn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2VRs3zvsfpXEqKmzn
@davior
davior marked this pull request as ready for review November 2, 2026 04:41
@davior
davior merged commit 6b5a134 into main Nov 2, 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