Skip to content

Anil-matcha/vox-ai-motion-graphics-generator

muapi-director

Verified

Turn ONE topic, talking-head video, or photo into a finished Vox-style paper-collage explainer / ad video on the MuAPI platform (api.muapi.ai) + local ffmpeg — script, collage keyframes, motion, voice-over, music, captions, all automated. Three input modalities: a topic (B-roll), a talking-head video (A-roll mode), or a single photo of a person/product anchored into the collage (C-roll mode).

scripts/style_bakeoff.py

View on GitHub
#!/usr/bin/env python3
"""
Style bake-off: render ONE representative beat in candidate collage styles so
the user can pick the visual idiom before generating the full film.
"""
import json
import os
import sys

from provider import get_provider, run_jobs
from styles import compose_collage_prompt, STYLE_LIBRARY, resolve_theme, image_params

IMAGE_MODEL = "flux-dev"
DEFAULT_CANDIDATES = ["american-retro", "swiss-modern", "punk-zine", "atomic-age"]


def first_shot(beat):
    return beat["shots"][0] if beat.get("shots") else beat


def run(project_dir, styles=None, beat_index=0):
    styles = styles or DEFAULT_CANDIDATES
    with open(os.path.join(project_dir, "beats.json")) as f:
        doc = json.load(f)
    aspect = doc.get("aspect", "16:9")
    img_model = doc.get("image_model", IMAGE_MODEL)
    img_res = doc.get("image_resolution", "1k")
    beat = doc["beats"][beat_index]
    shot = first_shot(beat)
    scene, bg = shot["scene"], beat.get("bg", "warm ochre")
    tcn, ten = beat.get("title_cn", ""), beat.get("title_en", "")
    out = os.path.join(project_dir, "style-bakeoff")
    os.makedirs(out, exist_ok=True)

    prov = get_provider(doc.get("provider"))
    specs = {}
    for name in styles:
        tp = resolve_theme(name) or {}
        prompt = compose_collage_prompt(scene, tcn, ten, bg, aspect,
                                        style=tp.get("idiom", name), palette=tp.get("palette"),
                                        type_style=tp.get("type_style"), finish=tp.get("finish"))
        specs[name] = (lambda p=prompt: prov.submit_image(img_model, p,
                                                          **image_params(img_model, aspect, img_res)))
        tag = "library" if name in STYLE_LIBRARY else "custom"
        print(f"[{name}] ({tag}) queued")

    done = run_jobs(prov, specs, poll_s=3, stall_s=75, max_retries=2, deadline_s=240)

    for name, url in done.items():
        if url:
            prov.download(url, os.path.join(out, f"{name}.jpg"))
    print(f"\nSaved candidates to {out} — review, then set 'collage_style' in beats.json.")


if __name__ == "__main__":
    proj = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else
                           os.path.join(os.path.dirname(__file__), "..", "out", "demo"))
    styles = sys.argv[2].split(",") if len(sys.argv) > 2 else None
    bi = int(sys.argv[3]) if len(sys.argv) > 3 else 0
    run(proj, styles, bi)
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall