Repository navigation
Let image models take a custom width × height - #53
Merged
Merged
Conversation
FLUX's named sizes stop at 1024 px on the long side, about half a 1080p
frame, so Video Creator had no way to ask for a picture big enough for
its video. A catalogue row can now declare `options.custom_size` (limits
per side, a multiple, an optional pixel cap), and `POST /api/generate`
accepts `params.width`/`height` for such a row, sending them to fal as
`image_size: {width, height}`.
A migration turns it on for the seeded FLUX rows, capped at 5 MP: enough
for 1.5x a 1080p frame without going far past what FLUX.1 was trained at.
The admin editor gains the field, so saving a row keeps it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2v7vJwCcyYXHHkrxP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Video Creator asks GAM to generate stills for a video, but it can only pick from each model's fixed option lists. For FLUX those are named presets that stop at 1024 px on the long side (
landscape_16_9is 1024×576), which is about half a 1080p frame. GVC wants pictures sized to its video, at 1.5× the frame so Ken Burns zooms and crops stay sharp. fal's FLUX acceptsimage_size: {width, height}, but GAM had no way to express that.What
custom_size: eithernull, or{max_width, max_height, multiple_of, max_pixels}.multiple_of≤ 64, unknown keys refused, image kinds only.null.POST /api/generate. Acceptsparams.width/params.heightfor a row withcustom_size.multiple_of.image_sizeis refused.image_size: {width, height}, so regenerating makes the same size again.f3a7d2c18e54. Turns it on for the seededfal-ai/flux/schnellandfal-ai/flux/devrows.docs/m8-ai-generation.mdcovers the new option, the params and the refusals.Megapixel billing already reprices from the probed output size (
pricing.py), so nothing changed there.The paired GVC change uses this when it's available and falls back to size tiers / presets against an older GAM.
Limits not checked against fal
fal.ai wasn't reachable from the build session, so the limits are deliberately conservative rather than taken from fal's schema. An admin can widen them per row.
Tests
pytest -q: 1425 passed.npm test: 439 passed.npm run build: clean.custom_size.Generated by Claude Code