Spaces:
Running
Running
Commit History
11 days ago
-
Never send the swap model a segment spanning a cut, and burn many captions in passesβ Running
A jump cut inside a 15s segment left the original presenter in the output after it. Segments now end at every cut, caught at a lower scene threshold. Separately, 300 caption overlays in one ffmpeg graph never finished; past 60 they go on in passes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>f82185e
18 days ago
-
Decide who is on screen per shot, so a second of the presenter before b-roll is still swappedβ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>55104c7 -
Count the dissolve overlap against the model's 15s shot limitβ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>049b154 -
Swap segments end on the source's own cuts and dissolve elsewhere, so hair stops popping every 15sβ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>992916b
21 days ago
-
Report a swap as 100% done, not left at 92% matching lipsβ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>028a527 -
Change the swap's voice a minute at a time: Chatterbox gave HTTP 500 on a whole long trackβ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>7aa00fa -
Accept five-minute videos in Avatar Swap and raise the upload cap to 500 MBβ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>35e9dae
22 days ago
-
Change the swap's voice against the avatar's sample, not an ElevenLabs voice idβ
250 of 257 avatars speak with MiniMax clones, which ElevenLabs' voice changer refused ("Voice not found"). Chatterbox HD speech-to-speech converts the soundtrack against the stored voice sample, so it works for every avatar; $0.02 a minute in both cost tables. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>81d7a57 -
Avatar swap: speak in the avatar's voice, handle burned-in captions, skip faceless segmentsβ
- Swapped segments go to the model only when a face is on screen for a real share of them; a shot of only a hand had the avatar drawn into it. - Burned-in captions came out scrambled, the models repaint the frame. A three-way choice: keep, paint them out (letter-level OpenCV inpaint, held a quarter second around each word), or paint out and caption again from the voice in the same look. - Optional ElevenLabs voice-changer pass so the soundtrack is the avatar's own voice, same words and timing; $0.005/s in both cost tables. - Caption transcription can use ElevenLabs Scribe (word stamps ~0.5s truer than Whisper on a swapped ad); default stays Whisper. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>d24bccb -
Keep a b-roll segment as is when the swap model finds nobody in itβ
A face / b-roll / face video failed outright: Recast answers HTTP 422 "No people were found" for the person-free segment. That segment now goes back into the stitch untouched; a whole video with nobody on screen gets a clear message instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>a83daa2
23 days ago
-
Lip-sync swaps with sync-3 so a hand crossing the face keeps its fingersβ
lipsync-2 repainted the mouth over anything in front of it, and fal's v2 endpoint has no occlusion switch. sync-3 detects hands and generates around them; only the lips are repainted. Price moves from $3 to $8 a minute in both cost tables. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>0a95244 -
Match the swapped face's lips to the voice with a lip-sync pass after the swapβ
Recast copies the source mouth motion onto the new face and never looks at the audio, so the lips drifted. The stitched swap now goes through sync-lipsync-2 with the source soundtrack, on by default and switchable off, priced at $0.05/s alongside the recast rate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>2ad6802
24 days ago
-
Let the Avatar swap page take an uploaded photo instead of a library avatarβ
The swap request takes an avatar id or a product-photo key, exactly one; the key must match the pattern the image upload route writes, so the worker can only read back what that route stored. The page adds an upload button beside the avatar picker, and choosing one clears the other. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>3735166 -
Add an Avatar swap page that puts a library avatar into any uploaded video, in segments, keeping its soundβ
MiniMax H3 Max Recast on fal replaces the person in existing footage while keeping motion, camera, timing and soundtrack. Videos over 15s go up as 15s segments with one seed and are stitched back; the source audio is laid over the result. The editor's Clip tab gets the same swap for one clip. The reference upload gains a keep_audio option because it stripped sound before the swap could see it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>36c7c8a
29 days ago
-
Wobble only while the presenter is on screen, and keep a reference ad's script word for word when askedβ
The handheld shake ran over the whole cut with a burst every ~2.5s, so product shots shook like the selfie around them and the team called it constant. It now follows the presenter windows (crossfade-corrected), eases to centre at every cut, bursts about every 6s and defaults to 0.02. With a reference ad, a new keep_reference_script brief flag transcribes its words verbatim and uses them as the script: the hook and script agents and the revision pass are skipped, one candidate is built, and only the visual direction, QA and b-roll run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>6c809e6
30 days ago
-
Return the resync job id from the visual chat, so the page can follow itβ
The last push's VisualChat read `revalidation_task_id` off the result, but the field and the route that sets it were left behind, and the deploy build failed on the missing type. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>28e72e2
-
Make the shot list follow a chat-rewritten script, and refresh it without a re-score clickβ
A chat note rewrote the script but the scenes kept the old lines, and the render speaks the scenes. A shot list that doesn't say the new words is now dropped so the resync re-derives it, and the detail page follows that resync job so the scenes refresh on their own. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>ff6fb00
-
Reuse the b-roll and hooks we already own, keep the avatar's face on every clip, render in HD, remember products, and let the chat rewrite the scriptβ
B-roll library: a cutaway without a prop frame or the ad's own person first searches the catalogued hooks_video clips (vector match, then a flash judge on subject and action), and the Drive copy is cut, muted and cropped to 9:16; the hook agent may open the ad on a catalogue clip (hook_clip_id) with the spoken hook as TTS voiceover, and in continuous mode the rest of the ad inherits that voice. Reused clips are reported as library_clips. BROLL_LIBRARY toggles it. Avatar drift: the library avatar's portrait and voice sample now go to Seedance on every presenter clip, not only the first (the ecom Genie render had a different woman three hops on). A refused portrait stops the render instead of quietly rendering a stranger. `recovered` and `library_clips` are stored on the renders row (migration 0013). Resolution: the plan carries 480p or 720p, chosen in the render UI; the editor reads a stored clip's size back so edits keep the render's quality. HD is priced at fal's 720p rate in both eβ¦6b440a2
-
Embed every evidence table, read the winners' shot-by-shot analysis, and use the imported hook clips' tagsβ
2071 rows across videos, hooks_video, hooks_text, leads, frameworks and broll had no embedding, so vector retrieval returned nothing for them and the pool fell back to the newest 150 rows by insertion order. The backfill script never listed videos, hooks_video or leads, still named the renamed `hooks` table, and read one 1000-row page of a 1700-row table. Fixed and run. videos.ffanalysis (170 of 173 winners: beat-by-beat dialog and visuals, concept, what's working, audience strategy) was never read; it now goes into both the embedding and the evidence the agents see. hooks_video's import columns (category, use_case, emotion, orientation, duration) likewise; vertical clips rank ahead of landscape ones for 9:16 ads. Migration 0012 records the columns added and dropped in the dashboard since the baseline, and the research prompt stops asking for the two niches columns that no longer exist. CLAUDE.md added for future sessions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>d38fa83
-
Ask one question at a time, show the wait, let the brief lead, and keep refusals, faces and voices in handβ
New generation form is a stepper with a review page. Running jobs show the usual time left, learned from finished renders. A brief the requester typed outranks the brain's patterns. A reference can be matched closely (same setting, cast and shots), the reader records cast and setting, more than one person may speak, and a chosen avatar is the main character with their look read from the portrait. fal moderation refusals were misread as transient when the echoed prompt contained a word like "internal": status decides now, so the chain-refusal ladder sees them. Gemini calls time out instead of freezing a run. One QA rewrite per candidate, two candidates for long ads, one critic re-render, four worker slots on the Space. Picture-chained clips carry the ad's voice as a reference, so it no longer drifts to another speaker. Realism prompts say what phone footage looks like instead of listing what to avoid. Styled cards pick a band clear of the face, and the selfie band stays clear when no β¦af66f2f
-
Keep the chosen avatar's face in every shot, and read Shopify products past the bot wallβ
The visual director never saw which library avatar the brief picked, so it invented a presenter (often the one in the reference ad) and every clip was prompted for a different person than the portrait it referenced; the face drifted. The workflow now reads the avatar's look once from their portrait and hands it to every agent as the one presenter. A Shopify page refused to a datacenter address (Cloudflare's bot wall) now falls back to the shop's own product JSON, so the product still fills in. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>bc68c36
-
Cast real people with their own voices, sell the product you attached, and take five-minute adsβ
Avatar library: 250 presenters imported from reference creators, each with a MiniMax voice cloned from their own sample (scripts/clone_voices.py), so the classic, green-screen and split modes speak in the avatar's voice instead of a stock one. Library frames are cropped to 9:16 on load and voice samples trimmed to what Seedance accepts, and the stitch now scales and crops every clip to the exact frame, which is what let the first avatar render through. Product briefs: an Ecom niche whose ads are always for one product (the API refuses one without), product pages read into facts and photos, and a brief that carries a product is researched from the product rather than the niche. The form no longer carries a prefilled brief from one niche into another. Limits: reference ads and generated ads up to five minutes. Long videos go to Gemini through its file store and are deleted the moment the read is done. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>7dfe8d4
-
Stop paying twice, measure every run, and make the picture, voice and props hold upβ
Spend and reliability: identical paid requests reuse the running job, every paid button shows a price and asks first, uploads no longer block the server, job status comes from the database, and the synchronous video endpoint is gone. Measurement: every model call logs tokens and cost, generations and renders carry a cost, and an eval runner replays saved briefs without touching the DB. Platform: vector search over the whole library (pgvector HNSW), one image that runs as api, worker or both, persistent Redis, TLS for external Redis, and a production guard that refuses local media. Scripts and judging: a hard spoken-word budget, no fragment sentences in continuous mode, a fixed Gemini judge on every run, ad-policy checks, and hooks drawn from the brain or the research with no opener steering. Video: a render critic that reviews every clip and re-renders the bad ones, takes planned to land within 10% of target, portraits checked before any paid animation (no more grid presenters), thβ¦13354e2
-
Add green-screen and split-screen modes, reference-ad generation, researched briefs, and a voice that sits in the pictureβ
Video modes, chosen on the New Generation form (default = the old flow): - greenscreen: one lip-synced presenter (OmniHuman) matted out with veed background removal and laid small in a corner over b-roll, hopping corners every few seconds; every scene is a silent cutaway behind them - split: the same pipeline stacked top/bottom, flipping each take; cards, CTA pill and stamps follow the flip - TTS is chunked into takes under OmniHuman's 30s cap and checked before any clip is paid for; a failed presenter take fails the render instead of shipping b-roll alone; raw takes are kept beside the clips Reference-ad mode: upload an existing 10-90s ad, Gemini reads its structure (hook type, beats, pacing, format, tone) in two passes so no market words survive, and the reading is pinned as the chosen concept. Brief is optional: blank (or a placeholder like "make like the reference") is filled by live niche research before any agent runs and logged as brief_derived; the form prefills froβ¦02862d5
-
Render in parallel where the picture allows, cut clips to their words, never render a job twiceβ
Three reasons a 40s ad took two hours and came out at 56s, from the last render and its job row: - Every clip chained from its neighbour, so twelve clips at ~10 min each ran serially. Only the PICTURE has to be serial (presenter to presenter); the voice is the same everywhere. Cutaways now take the voice sample from the first clip and render in parallel beside the presenter chain β ~5 clip-times for a 12-clip ad. The presenter chain drops to voice-only rather than chaining a face from a cutaway; a refused setting image on the voice chain walks back instead of producing an invalid audio-only request. - Late acks on a Redis broker with the default one-hour visibility timeout handed every render longer than an hour to a second worker as if the first had died: the same job rendered twice (its stage jumped from clip 11/12 to 8/12), two or three renders per asset, Seedance paid twice. Six-hour visibility timeout with matching task limits. - Seedance pads clips to whole sβ¦334ff81
-
Burn in social-native overlays, feed human notes back, and give the camera a real handβ
- Overlay engine: 21 TikTok/CapCut/iOS/Snapchat templates vendored from ArielleTolome/overlay-text-video-editor (MIT) and rendered in headless Chromium via Playwright (app/services/overlay_styles.py). Our Pillow renderer is the fallback for every one of them, so a Space without a browser still ships a finished ad. GSAP is vendored: the templates expect the host to provide it and drew nothing without it. Their caption substitution replaced a sentinel inside the scripts too and fell back to demo text; we substitute in markup only. The notification storm and stack templates were hardcoded demos; they now take our notifications. - Captions default to the CapCut bounce style (bold, keyword highlight) with a pop-in animation; the editor gets a Caption style control. Karaoke stays as our own renderer and as the fallback. Styled frames are trimmed to their content so they can be animated about their own centre. - The director's on_screen_text, never rendered before, is buβ¦e0d867f
-
Keep every cutaway on its own sentence, and chain by voice where frames get refusedβ
Feedback on shipped ads: the b-roll did not match the words over it, cutaways ran long, the presenter footage was too steady to read as a phone, "..." in the script played as dead air, and phones in cutaways showed invented screen text. The mismatch had one mechanism. The auto fill took scenes in order, so the first eight scenes of a 14-scene ad all became cutaways; the 3s cap then drained each one's surplus words into the next, eight times, leaving every cutaway holding a mid-sentence fragment ("5 and try this AI trick. It's") and the presenter after the run with a 9s monologue. A fragment has no subject, so the shots described for them were generic by construction. - An over-cap cutaway is cut into two or three shots that keep their sentence (`full_line`) and are described as ONE sequence under it. Neighbours keep their own words. Filler prefers short lines and never runs past three in a row. - Caps run before the cutaway description pass; a cutaway whose line changed is descβ¦348ebdb
-
Tell a slow render from a stuck oneβ
The tray declared a healthy render dead at clip 7 of 8. The server and the client disagreed on what "lost" means: jobs.py ages a job from `updated_at`, so every tick resets the clock and it measures staleness; the client compared `now - startedAt`, which is total runtime, and then printed "no progress for 45 min" β a thing it never measured. Being slower than the threshold is not the same as being stuck, and the client's guess overruled a server that was correctly reporting the job as running. It matters now because continuous mode generates clips serially and the prompt budget split raised the clip count: a five-clip render took 40 minutes, an eight-clip one takes fifty. Every render was about to be declared dead. Jobs now carry `progressedAt`, re-stamped only when progress or stage actually moves, and prune ages from that. The message names the stage it stalled at rather than asserting a duration nothing checked. fromServer took its timestamp from Date.now() directly, so none of tβ¦a089b83 -
Never plan a prompt the video model will rejectβ
Packing several scenes into one generation made prompts far longer: the production style and style anchor alone are ~1.8k characters before a single shot is described, and each labelled shot adds its action, setting, lighting and line on top. A wordy shot list therefore produced 5279-character prompts against a 4000 limit β and since the plan is rebuilt deterministically from the shot list, pressing "Plan video" again returned the identical rejected prompt. Prompt edits in the panel are local, so the only escape was rewriting the shot list. Grouping counts scenes and seconds; neither predicts prompt length. So the plan now compiles each group and splits any that would not fit. Wordy shot lists get fewer shots per clip, which is the honest trade β a plan that cannot render is worse than one more clip. The panel also hid the prompt editor unless the stage was exactly "reviewing", so a failed render left an error and a "Plan video" button and no way to reach the clip that failed. It shoβ¦35fe988 -
Cut at an ad's pace, and check every edit instead of waiting to be askedβ
Continuous mode rendered one Seedance call per scene, so every scene inherited the model's 4s minimum CLIP length. A 2s cutaway was unrenderable and 13 shots forced a 52s floor onto a 44s ad β the pipeline could not make the ad it was asked for, and the padding played as dead air. Scenes now share a generation as labelled, timestamped shots with hard cuts between them, which is what Seedance 2.5 does natively and what the muxed path already relied on. Three calls where there were thirteen: cheaper, faster (this mode renders serially), and fewer chained clips means less presenter drift. Delivery was conversational at 146 wpm. The only speed lever in this mode is the prompt, and it said "unhurried, do not rush" β while the script agent wrote to a stale 2.2 words/second the pipeline had long since left behind, so every script came in a third short of its runtime. Both now read the same measured number. The chain reference was the whole previous clip. Seedance continues from where it ENDβ¦2ce71df
-
updated gitignore
68eb821
-
Make the product legible: scorecard, progress, compare strip, auto b-rollβ
Organised around the user's three decisions β which candidate to render, whether a render is worth spend, and did it win β instead of around how the pipeline works. Render scorecard - Every render is measured with ffmpeg as it saves (dead-air %, cut count, avg/longest shot, duration vs target) into renders.scorecard (0005), shown as banded chips on the render card. Every defect caught this month was found by measuring the file by hand after it already felt wrong; now the numbers arrive with the render. Edited exports are measured too. Renders report progress β and "lost" means lost - The progress pipeline existed end to end and the longest job in the product never used it: run_render made no ticks, so the tray's 45-quiet-minutes rule declared a live 21-clip render lost and told the user "no result" while it was still spending money. Ticks per clip now bump the row, so lost genuinely means nothing moved for 45 minutes, and the lost message says what that implies (a cβ¦1030636 -
Ground cutaways in the real library, score every variant, filter by date, retry a failed runβ
B-roll grounded in catalogued footage - The second-pass cutaway call was passing evidence=None, so it wrote shots from imagination while 900+ catalogued clips sat unused. It now receives the library and is told to find the clip whose visual_description fits the line and describe THAT shot β its framing, motion, mood, subjects, and its visual_direction where present. Those clips were really filmed, so recreating one lands closer to real footage than anything invented. Variants are finished, not sketches - QA judges a script AGAINST its shot list, so a bare script cannot be scored. Each variant now gets its own visual direction, b-roll plan and QA verdict, and the list is sorted best-first β you pick by number rather than by feel. Three calls a variant, on a button you pressed. - Adopting one now re-derives the shot list and re-scores, exactly as saving a hand edit does. Without that an adopted variant kept the previous candidate's shots and a score describing a scriβ¦7dc13d4 -
Describe every designated cutaway, so b-roll stops rendering as a talking headβ
A render labelled 100pct b-roll came back as 8 talking heads out of 13 shots. The designation was right: all 15 scenes were marked is_broll. The b-roll director had proposed cutaways for 3 of them (scenes 5, 7, 12). The other 12 had no broll_description, and _compile_montage_prompt falls back to `subject_action` β which the visual director writes as the presenter, in this case "A man in his early 30s with short dark brown hair, light stubble..." on nine scenes. A montage prompt describing a man speaking renders a man speaking. The structural cause is ordering: the b-roll director runs BEFORE the b-roll percentage decides which scenes become cutaways, so it plans a few good ideas rather than one shot per cutaway. It cannot cover scenes it does not know about. - A second pass now runs after designation, listing exactly the scenes that were designated and have no shot, and asking for one insert each. Skipped entirely when there is no gap, so the extra call is only spent when it is β¦6a179f2
-
Make the learning scoreboard writable, and stop hiding when it isn'tβ
element_tallies has 0 rows while two agents are instructed to rely on it β the hook writer is told to "prefer types with more wins", the strategist the same. Both have been reading an empty table, so every learning-loop claim in this codebase was decorative. Diagnosed by probing rather than by reading: a check constraint on `niche` rejects EVERY value β all 14 niches.key entries, 'general', and NULL, each failing with 23514 element_tallies_niche_check. The table can never accept a row, so there is no application-side workaround. (The probe left nothing behind; failed inserts write nothing and the one that had to be tried was deleted.) An earlier note in _bump_tally guessed the constraint was about invalid niches. It is not: every niche in the registry is valid and none is accepted. - 0004 drops the constraint, adds a unique index on (niche, element_type, element_value) so two concurrent gradings cannot split one element's score, and backfills from every already-graded render ANDβ¦2595919 -
Script variations on demand, and apply the winner's own QA notesβ
Script variations - "Write 3 variations" next to the script: same hook, same claims, same beats, different delivery. The counterpart to the QA fix button, which repairs something broken β this one assumes the script is GOOD and asks what else could be said, which is the variable worth testing when the offer is fixed. - Variants are drafts. They are logged, not attached: an unapplied variant on the candidate would make "what is this ad" ambiguous. Adopting one goes through the normal edit path, so the script it replaces is saved and the shot list is re-derived exactly as a hand edit would do. - Runs as a Celery job (one Gemini call per variant) and reports through the existing tray rather than blocking the request. Winner polish - The revision loop is `while not qa.passed`, so a PASSING candidate is never revised and its own QA notes are recorded and dropped. A shipped ad said "protected their household cashflow" β the exact brochure phrasing QA flagged β with the rβ¦28e4e84 -
Fix two wiring bugs, stage the hook's own shot, keep every spoken wordβ
Found by verifying rather than by testing: 452 unit tests passed with a NameError on the pipeline's most-travelled path. - _revise took `revision`, not `revision_count`, so threading the hook through matched _generate_script instead and left `hook` undefined at two call sites. Every candidate scoring under 80 would have crashed β two of three on the last render. Caught by ruff F821. - enforce_clip_caps runs AFTER the pre-broll split and moves words forward, so a receiving scene lands back over the shot cap and the split is undone. Splitting again after the caps pass is what actually holds the ceiling. - The visual director received hook_bank but never approved_hook, so it staged scene 1 from spoken copy and defaulted to a talking head β even when the hook had correctly asked to open on an object, which is what the shipped render did. Now passed on every call including both inside the revision loop; losing it on a revision would silently reintroduce the presenter. - Tβ¦b3cbda7
-
Ground generation in the real schema, and tune pace against reference adsβ
Two reference ads were torn down shot by shot and measured. Ours ran 4.4s average shots with 15% dead air; they ran 2.6-3.7s with 0-11%. Everything here follows from closing that gap and from writing the database schema down next to the code that reads it. Pace and dead air - Only the last VOICED clip holds a beat now. SPEECH_TAIL_SECONDS was paid on every clip, which put ~0.7s of silence on each cut: 7.4s of a 48s ad. - presenter_max_seconds (6s), separate from the model's 15s per-clip ceiling. The two were the same value, which is exactly why the longest shot measured 15.0s β the model's limit standing in for an editor's. - split_overlong_scenes cuts a long monologue into several shots. Moving surplus words to a neighbour cannot converge: the last scene has no forward neighbour, so it pushes them back and the pass ping-pongs. Latent at a 15s cap, guaranteed at 6s. Replay of the shipped ad: 11 shots -> 14, avg 4.27s -> 3.36s, longest 15.0s -> 5.1s. The hook decides itsβ¦6272eef
-
Move every hosted model to fal.ai, and cast the narrator to the presenterβ
Replaces Replicate entirely, upgrades Seedance 2.0 -> 2.5 at 480p, and swaps Gemini TTS for ElevenLabs v3. Also lands the brain tables, the concept picker, and the QA/version work β they share too many files to separate without leaving intermediate commits that don't run. Provider migration - app/services/fal.py is the single door: upload (fal takes URLs, not file handles), run (subscribe owns the queue, so the create/poll/reload loops are gone) and guard, which preserves the failure taxonomy that matters β a moderation refusal must stay distinguishable from a 503 or we either burn retries on a request that can never succeed, or lose a render to a blip. SeedanceError is renamed ProviderError now that it covers speech. - Seedance 2.5 splits into per-mode endpoints and text-to-video accepts NO reference input, so the endpoint is chosen by whether a reference was passed. Live testing caught a 422 on top of that: 2.5 rejects an explicit aspect_ratio on a video extension, sβ¦07f3ede -
Make the tabs, disclosures and controls reachable by keyboardβ
Measured the palette first: it is in good shape (chalk 14.6:1 on slate, gaffer 8.5, viewfinder 6.8), and focus rings, reduced-motion and press feedback were already there. What was missing was structural. - The three view tabs were plain buttons: nothing announced them as a set, nothing said which was selected, and Tab walked through all three before reaching the panel. Now a real ARIA tablist with roving tabindex, so the strip is ONE tab stop and left/right moves between tabs. - Disclosure buttons carried no aria-expanded β the +/- glyph was the only state signal, invisible to a screen reader. The glyphs are aria-hidden now that the button announces itself. - No landmarks at all, so assistive tech had no way to skip the header into the content. Added <main> and a skip link. - The editor's 3x3 position grid conveyed the selected cell by fill colour alone; it now carries aria-pressed and a real label per cell. - A 32px min-height floor on buttons: the compact uppercase laβ¦19955ca
-
Recover a flagged clip instead of failing the whole renderβ
One clip refused by the video model's content filter failed the entire render, discarding every clip that had already generated. That is the wrong trade: the flag is a property of one prompt, not of the ad, and the other five clips were already paid for in minutes and money. Your logs show this hitting twice today. A refusal is now treated as a prompt problem and retried, best-quality fix first: 1. A Gemini rewrite that keeps the shot's intent and removes what triggered the refusal. A flash call costs a fraction of a cent against a clip that costs minutes, so it is worth spending before the free option: the deterministic pass produces clumsy prose, and a clumsy prompt yields a clip nobody can tell was degraded. 2. Deterministic substitutions for the phrasings that actually trip Seedance β anchors, officials, celebrities, logos, medical and distress imagery, children, absolute claims. Also the internal fallback when the rewrite call itself fails. 3.β¦05205d2 -
Re-score after a visual-direction edit too, not only a script editβ
Only a script change triggered a re-score, so editing the shot list by hand β or through the chat β left `final_score` describing a plan that was no longer there. The score is the one number a user trusts to compare candidates, so a stale one is worse than no number. `resync_visuals=false` already existed for exactly this and was never called: - Saving the form now re-scores when EITHER the script or the shot list changed, and re-derives the shot list only when the script did. A hand-edited shot list is re-scored without being regenerated, which would have thrown the edit away. - The chat panel gets an explicit "Re-score" button rather than doing it per turn. Notes arrive in bursts, and a QA call per message would both cost more and leave the grade jittering while you are still deciding. The header says plainly that the grade is stale until you press it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>6236afc -
Add a chat surface for the visual directionβ
Editing a shot list through form fields means knowing which of thirteen fields to change on which of six scenes. "Make scene 3 a close-up of hands, and lose the kitchen" is how a person actually gives that note. One Gemini call per turn, synchronous β a chat that takes a minute to answer isn't a chat. The reply and the revised shot list come back together. The distinction that makes it trustworthy: a QUESTION is answered with `visual_direction: null` and nothing is written. Only an instruction rewrites the plan, and it returns the complete shot list with `changed` listing what moved, so the diff is legible rather than implied. Whatever comes back is re-baked exactly as a generated shot list is β b-roll designation, then the clip caps β because the model returns creative direction, not a render-ready plan. `final_score` is deliberately left alone: the shot list moved, so the old score no longer describes it, and inventing a new one without running QA would be worse than showing it viβ¦42325a9 -
One voiceover take across a run of consecutive b-roll cutawaysβ
A separate TTS call per clip resets the speaker's prosody at every cut, which is why a montage sounded like several voice takes instead of one narration. Adjacent b-roll cutaways now share ONE take: their clips are generated silently, cut to their share of it, hard-cut together, and the take is muxed over the result. The run becomes a single clip. Hard cuts inside a run are not a style choice. `stitch_clips` dissolves boundaries with `acrossfade`, which OVERLAPS audio β so a dissolve under a continuous take would eat `video_crossfade_seconds` of real speech at every cut, four cuts costing over a second of words mid-sentence. `crossfade=0` forces concat. The default dissolve stays everywhere else, where it is safe precisely because a clip normally ends in padded silence. Each clip's share is proportional to its line's character count β the heuristic build_cues already uses to time caption chunks, so cuts land roughly where the words do. The held beat is charged to the LAST clip only; β¦ce87d5c -
Re-record the voiceover when captions are editedβ
Editing a caption changed only the burned-in words. The voice went on saying the original line, so the finished ad contradicted itself on screen β the one failure mode where the caption feature actively made the video worse. The editor now detects when a clip's cues have drifted from the words it speaks and offers to re-record. `revoice_clip` keeps the existing footage and replaces only the audio: one TTS call plus a mux, seconds rather than the minutes a video regeneration costs. The hard part was a line LONGER than the clip it was written for. `mux_clip_audio` sets the output length with `-t`, so the container came out the right duration with no video in the tail β measured at 100 of the 188 frames a 7.5s clip needs, i.e. 3.5s of nothing. `hold_last_frame` pads the video with a cloned final frame instead, which reads as a held beat; black would read as the video having broken. Existing callers trim to min(video, audio) and never reach it, so their output is unchanged. A split clipβ¦953636e -
Re-derive and re-score a candidate when its script is editedβ
Saving a script edit changed only the words. The shot list still described the old script and `final_score` still belonged to copy nobody was going to film β both misleading in the same direction, since they make a hand-edited candidate look validated when it hasn't been. A script edit now runs the same three agents the pipeline would: the visual director (the shot list follows the words), the b-roll director (cutaways follow the shot list), and QA (the score follows both). Three Gemini calls, so it goes through Celery and appears in the jobs tray as "Re-score". Details that matter: - Only a SCRIPT change triggers the resync. Editing the shot list by hand does not regenerate it β that would throw the edit away. `resync_visuals=false` re-scores without touching the visuals at all. - The visual director is shown the previous shot list alongside the new script and told to keep what still works. Re-deriving from scratch would lose the presenter's description, and the face would dβ¦17fd563 -
Show true totals on the dashboard tiles, counted in the databaseβ
The tiles counted whatever rows happened to be loaded, so with 36 generations in the account "Total" read 30. Relabelling it "Loaded" with a trailing + made it honest but not useful β the number you want is the real one. GET /generations/stats counts in postgREST instead, so the payload is one row whatever the table size: a dashboard total must not get more expensive as the account fills up. `completed` and `failed` are counted exactly the way _derive_run_state derives a status β a filled agent_outputs, or human_flag without one β so the tiles agree with the badges on the rows beneath them, and `in_progress` is the remainder (clamped, since a row can be both flagged and finished). Declared BEFORE /generations/{asset_id}: FastAPI matches in declaration order, so the other way round "stats" is parsed as a UUID and 422s. Both directions are tested β that stats resolves, and that adding a literal path didn't shadow the detail route. The tiles fall back to counting loaded rows if the staβ¦38d1deb -
Size burned-in text against a reference frame; animate its arrivalβ
The size bug was not a bad default. Seedance renders 720x1280 and stitch_clips scales to HEIGHT 720, which on portrait footage produces a 406px-wide output β so the default 52 "px" caption was 13% of the frame width, wrapping a four-word cue into a wall of giant stacked text. Sizes are now quoted against a 1080-wide reference frame and scaled to whatever the real frame is, so one number means the same thing everywhere: measured at ~4.9% of frame width across 1080/720/540/406, and a cue box that went from overflowing to 60% of the width. frontend/src/components/editor/preview.ts mirrors the same reference width, and deliberately keys off the PREVIEW's width rather than the source clip's: the editor previews 720-wide clips while the export is 406 wide, so anything derived from the source would disagree with the finished video. overlayStyle's `scale` argument is gone β it was that source-derived number. Animated text: TEXT_ANIMATIONS gives each box an alpha ramp in and out β `fade` (0.2β¦ea3084e -
Give the hook more room; page the dashboard past 30 recordsβ
Hook cap 4s -> 6s (about 12 spoken words), enough for a complete thought. Cutaways stay at 4s β a cutaway is a beat you cut back from, a hook is not. The caps are now handed to the visual and b-roll directors as `pacing_constraints` data rather than written into their instructions, with the word budgets computed from the same helper enforce_clip_caps uses. Raising HOOK_MAX_SECONDS therefore changes what the model aims for and what the guard enforces together; previously the prompt said "3-4 seconds, 7-8 words" in prose and would have silently drifted out of step with the config. The dashboard asked for exactly 30 rows and offered no way to see more, so with 35 generations in the account five were simply invisible. It now fetches one row beyond the window to decide whether a "Load more" is worth offering β cheaper than a separate count query β and extends the window rather than paging, so the list only grows. The window size is a ref, not state: the 8s poll refetches whatever is currβ¦f26ba0d -
Cap the hook and b-roll cutaways at 3-4 secondsβ
A clip is cut to the length of its own voiceover (SPEECH_TAIL_SECONDS in app/services/render.py), so a scene's planned span never decided how long it was on screen β the words assigned to it did. Shortening the span would therefore have changed nothing, and dropping the overflow would have silently rewritten the script. enforce_clip_caps instead moves the overflow words to the neighbouring scene: the cutaway plays for its beat, and the sentence continues on the shot it cuts back to, which is what an editor does by hand. - Forward by default. The last scene has no forward neighbour, so its overflow moves back β and there it is the words spoken FIRST that move, or the end of the line would play before its beginning. A test caught that inversion. - The overflow cascades. Seedance caps a clip at 15s and mux_clip_audio then cuts the voiceover to the clip, so a scene that absorbed everything would have lost words off the end mid-render. Every non-capped scene now carries the model'sβ¦c9b2ccc