- Python 98.8%
- Shell 1%
- Makefile 0.2%
| anime_video | ||
| docs | ||
| profiles | ||
| scripts | ||
| styles | ||
| tests | ||
| .gitignore | ||
| go.sh | ||
| LICENSE | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
anime-video
anime-video is a local-first command-line system for reproducible video restyling on Apple
Silicon. It preserves source timing and audio, breaks longer videos into overlapping model windows,
records a manifest for every run, and keeps model weights and private media outside Git.
The first proven backend is the native MLX port of Wan2.1-VACE-1.3B in MLX-Gen 0.30.1. MLX-Gen does not register VACE-14B, so this repository adds the missing official architecture config through a narrow launcher. The exact checkpoint now initializes and emits source+reference video locally; the path remains experimental pending tensor parity, longer-run stability, and production-resolution evaluation. Bernini-R 1.3B is available as an explicitly experimental source-video + 1–8-reference backend.
Latest Wan2.2 render
Open the one-second silent H.264 render · open the full JPEG still
This is a prompt-guided Wan2.2 A14B video-to-video transformation generated locally on the M3
Ultra in one 17-frame model context, then trimmed to 16 encoded frames at 320x576 and 16 fps. It
uses the mixed Q8/BF16 checkpoint at revision 39ee5f1f630789956f29f40b5c2c6d48c6e9a798, 20
requested/16 effective steps, UniPC, strength 0.8, guidance 4/3, flow shift 3, and seed 2001.
The complete pipeline took 203.3 seconds. Visual review found a coherent cel redraw across the full
second: stable face, curls, glasses, botanical shirt, body silhouette, and hand geometry.
The source is the official ByteDance Bernini garment example at pinned revision
2d2b4591ac053ec25c6371b01a5a6746679e5793; its exact upstream and local SHA-256 values match.
The public artifact is silent and contains no source file or reference images. It is a modified,
generated technical demonstration—not a ByteDance result or endorsement. See
third-party media provenance and rights limits, including the retained
Apache-2.0 license and the unresolved performer-release limitation, before redistributing it.
Latest model-backed render
Open the 0.5-second H.264 render · open the full JPEG still
This is an eight-step, four-reference source-video transformation from official Wan2.1-VACE-14B
revision db79b90c60bbb45ceec9e41b9d5a4df934538ac4, generated locally on the M3 Ultra at
256x448, 16 fps, seed 1492, and conditioning scale 0.75. The 0.5-second research render took
123.8 seconds. The private source and conditioning stills are not included; only the generated,
silent render and generated still are published.
Higher-quality human portrait render
Open the 0.5-second H.264 render · open the full JPEG still
This 12-step, four-reference proof uses a clean crop from a live-action interview. A mild source
pre-grade compresses the harsh backlight before generation; prompt and conditioning are otherwise
held to the strong-cel baseline. It was generated at 480x448, 16 fps, seed 1989, and conditioning
scale 0.75 in 307.6 seconds. Matched beginning/middle/end review found finer face, glasses,
sweater, and hand linework than the 384x368 gate, with a more readable face, softer window light,
stable character geometry, and preserved motion across all eight output frames. The private source
and conditioning material are omitted; only the generated, silent render and generated still are
published.
Quick start
git clone https://git.dread.technology/brixton/anime-video.git
cd anime-video
export ANIME_VIDEO_HOME=/Users/brixton/anime-video-data # optional
./scripts/setup.sh
./go.sh input.mov refs/ output.mp4
Setup checks macOS/arm64, uv, ffmpeg, and ffprobe; installs the Python, MLX, and R2 extras;
creates the external data layout; downloads VACE-1.3B; and runs the tests. Pass --no-model for a
code-only setup or --model bernini-r-1.3b for the experimental reference-guided renderer.
Profile canvases rotate automatically to match portrait or landscape input unless explicit
--width/--height values are supplied.
Common commands
uv run anime-video doctor
uv run anime-video models list
uv run anime-video backends list
uv run anime-video inspect input.mov --hash
uv run anime-video anchors extract input.mov --count 8
uv run anime-video stylize input.mov --refs refs/ --style anime-90s -o output.mp4
uv run anime-video cel-finish output.mp4 -o output-cel.mp4
uv run anime-video cel-finish output.mp4 -o output-cel-soft.mp4 --preset soft
uv run anime-video benchmark input.mov
uv run anime-video clean --older-than-days 30 # dry run
cel-finish is the deterministic post-process used by the successful v3 A/B: mild gamma and
contrast, bilateral simplification, fixed RGB quantization, and an edge-derived ink pass. The
default --preset bold is the exact original 30% multiply graph. --preset soft uses the tested
step-24 quantization and 20% ink graph to retain more small moving highlights, including asymmetric
eye glints. It preserves input audio by default (--no-audio disables it), encodes H.264 yuv420p
with MP4 fast start, validates the result, and writes the selected preset, exact command, hashes,
and timing to <output-stem>.cel-finish.json. See docs/CEL_FINISH.md for both
fixed filter contracts and the sidecar schema.
Multi-chunk runs reuse the base seed by default so an independent window does not introduce a new
seed-driven grade or style interpretation. Pass --chunk-seed-mode increment to reproduce the
legacy base seed + chunk index behavior. Both the mode and every effective chunk seed are written
to the run record; fixed seeds reduce one source of drift but do not turn overlapping windows into
latent continuation.
Use --backend mlx-bernini --model bernini-r-1.3b to run the experimental ordinary-reference
route. --backend passthrough is only an end-to-end plumbing test; it never claims generation.
The registered Wan2.2 A14B prompt-only V2V route is also available through the normal chunking and manifest pipeline once its checkpoint is installed. It does not accept visual references:
uv run anime-video stylize input.mov -o output.mp4 \
--backend mlx-wan22-v2v --model wan2.2-v2v-a14b-q8 \
--steps 20 --guidance 4 --guidance-2 3 --video-strength 0.8
Its backend fixes the solver to UniPC and source mapping to exact resize, and defaults flow shift to
3.0 while allowing an explicit --flow-shift override, matching the pinned MLX runtime's V2V
contract. When the Wan2.2 model is selected explicitly, the CLI infers this backend and uses the
first-pass defaults shown above: 20 steps, guidance 4/3, and strength 0.8. Local visual review
passed prompt-guided style transfer at the exact 0.5-second/9-frame and 1.0-second/17-frame boundary,
using 320x576, 16 fps, seed 2001, and those defaults. Longer runs remain unreviewed, so the route
keeps its experimental label.
Data and provenance
The default data root is the platform cache directory. Set ANIME_VIDEO_HOME to a durable volume.
The Studio deployment uses /Users/brixton/anime-video-data:
anime-video-data/
├── incoming/ # source intake; private unless classified otherwise
├── models/ # isolated Hugging Face/MLX model cache
├── runs/ # manifests, staged refs, chunks, logs, output
└── exports/ # publication staging
Each run records the exact source/reference SHA-256 values, ordered references, prompt, negative
prompt, checkpoint handle, backend capability boundary, seed, geometry, fps, frames, chunk overlap,
commands, machine information, elapsed time, and output hash. When a generator emits an MLX metadata
sidecar for a chunk, the manifest also binds its run-relative path, byte size, and SHA-256; backends
without sidecars keep the same chunk record without that optional field. A Ctrl-C marks an active
manifest interrupted, records its completion time and error, and then propagates the interrupt.
R2 and Dreadtok
R2 publication is dry-run by default and uploads only output.mp4 plus manifest.json. Planning
needs no R2 authority. Execution reads server-side R2_S3_ACCESS_KEY_ID,
R2_S3_SECRET_ACCESS_KEY, R2_S3_ENDPOINT, and R2_BUCKET_NAME.
uv run --extra r2 anime-video publish r2 RUN_DIR \
--prefix generated/anime-video/RUN_ID \
--catalog-output /tmp/dreadtok-item.json
# Add --execute only after reviewing the object plan.
The command verifies uploaded object sizes and can emit a Dreadtok-shaped catalog fragment. The
core generator does not depend on Dreadtok. Public URLs are emitted only when
--public-base-url is supplied; private R2 objects remain represented by an internal key.
Truthful limitations
- VACE references are learned control inputs, not a magic style embedding. Segmented subject/object injection is proven; full-scene style influence is weaker, and multi-reference generations are not yet visually proven by upstream.
- Bernini is the closest current MLX route to ordinary multi-reference video editing, but its renderer is still experimental and has documented temporal/reference-fidelity failures.
- Overlapping windows are currently joined with a deterministic temporal dissolve. This reduces a hard cut but is not latent continuation. The run manifest makes that limitation explicit.
- VACE-14B's source-derived MLX config passes shape, weight-map, capability, checkpoint-init, same-seed reference A/B, and short visual-quality gates. Numerical parity, longer-run temporal stability, and production-resolution quality remain open.
See docs/MODELS.md, docs/ARCHITECTURE.md, and docs/STYLE_TRANSFER.md for the research record and exact conditioning contracts. The deterministic finishing contract is documented separately in docs/CEL_FINISH.md.


