Spaces:
Running
Running
Commit History
30 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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
Add a trend researcher and feed it into strategy, script and visuals
The EvidencePack is first-party and measured, which makes it trustworthy — and backward-looking. It can only hold patterns from ads that have already run. This adds the other half: what is converting in a niche right now, read off the live web and reconciled against the brain's own results before any generator sees it. TrendResearchAgent runs in two phases, for a measured reason. Gemini accepts a response schema and the google_search tool together, but on the same question a schema cut it from 7 searches / 19 sources down to 2 / 6 — it stops researching as soon as it can fill the fields. So `_gather` searches free-text and wide, and `_distil` turns that into a TrendReport. The distil step is the only one that sees the EvidencePack, and it is where "trending" becomes "trending AND supported by what we measured": agreements go to `aligned_with_evidence`, contradictions to `conflicts_with_evidence` and are not promoted. First-party performance data outranks a third-party trend. Verified…84cc805
-
Add background-job tracking; rebuild editor placement, split and trim
Editor - Text (captions and titles) is now placed by dragging it on the frame. `x`/`y` are frame fractions addressing the box's centre, clamped so a box dragged to an edge stays fully on screen. The `position` presets still apply when they're absent, so the render pipeline's own captions and older payloads are unaffected. Placement is computed in Python rather than as an ffmpeg `overlay=x=...` expression: those need commas, and comma escaping inside a filtergraph differs between ffmpeg builds. - Split at the playhead. Both halves keep the same manifest index, so the export trims one source file twice and nothing is regenerated. The spoken line is divided with the cut (EditClip.spoken) or both halves would be captioned with the whole sentence; titles anchored past the cut re-anchor to the second half. - Trim by dragging a clip's edges, with the playhead parked on the exact frame being dragged to. Undo/redo over clips, titles and caption edits, with a drag coalescin…9d66133
-
Deploy Creative Brain to Hugging Face Spaces (Docker)
Single-container Dockerfile (frontend build + ffmpeg + redis + celery + API on 7860), FastAPI serves the SPA, README front-matter, safe .gitignore. Runtime media (generated_videos/) is excluded — the app regenerates it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>b327bf6