InstructAV2AV is an instruction-guided framework for joint audio-video editing. Given a source video with audio and a natural-language instruction, the model edits the visual and audio content together while preserving the unedited properties of the source as much as possible.
This repository contains six task-specific InstructAV2AV checkpoints. They share the same architecture and inference pipeline, but are fine-tuned for different editing objectives, including general editing, content insertion and removal, visual identity preservation, voice preservation, and joint identity-and-voice preservation.
The unified command-line entry point is scripts/edit.py. The source video must contain an audio track unless a separate audio file is supplied with --source-audio.
Single-video editing
bash
1python scripts/edit.py \2 --source-video assets/input.mp4 \3 --instruction "Keep the person's identity and change the spoken words to <S>This is more than just art, it's a statement.<E>."\4 --finetune-path ckpts/InstructAV2AV/clone_id_voice.safetensors \5 --output outputs/edited.mp4
To use a separate audio track:
bash
1python scripts/edit.py \2 --source-video assets/input.mp4 \3 --source-audio assets/input.wav \4 --instruction "Make the horse dark brown with a white saddle."\5 --finetune-path ckpts/InstructAV2AV/general.safetensors \6 --output outputs/edited.mp4
Prompt enhancement
When specifying new spoken content, place the target utterance between <S> and <E> markers:
Change the spoken words to <S>This is the new sentence.<E>.
For better editing quality and text-to-video alignment, append a detailed description of the desired final video immediately after the editing command. The enhanced prompt can describe the subject's appearance, clothing, actions, expressions, scene, and target speech. For example:
bash
1python scripts/edit.py \2 --source-video assets/input1.mp4 \3 --instruction "Change the man into a young woman with brown hair, wearing a gray blazer over a light pink top and a necklace with a heart-shaped pendant, and saying, <S>I really think we should give it another chance.<E>. A young woman with long, wavy brown hair and fair skin is engaged in a conversation. She is wearing a gray blazer over a light pink top and has a necklace with a heart-shaped pendant. Her facial expressions change throughout the sequence, showing a range of emotions that suggest she is either explaining something earnestly or reacting to a conversation, and says <S>I really think we should give it another chance.<E>. The setting appears to be indoors, with a dimly lit, blurred background that suggests a social environment, possibly a bar or restaurant. The focus remains on the woman's face, capturing her reactions and engagement in the dialogue."\4 --finetune-path ckpts/InstructAV2AV/general.safetensors \5 --output outputs/edited.mp4
Gradio demo
After downloading all six checkpoints and the dependency weights, launch the interactive demo with:
python scripts/demo.py --share
Default Inference Configuration
The released configuration uses 121 frames at 704 × 1280 resolution, 16 kHz audio, 50 sampling steps, and bfloat16 inference. CUDA is required. See ovi/configs/inference/inference_av_edit.yaml in the code repository for all options, including guidance scales, seed, sequence parallelism, and CPU offloading.
The unified training entry point is scripts/train.py, with configuration in ovi/configs/train/train_av_edit.yaml. The trainer accepts CSV, JSON, or JSONL manifests with the following canonical fields:
Field
Description
source_video
Original video
source_audio
Original audio
target_video
Edited video
target_audio
Edited audio
instruction
Editing instruction
Before training, set the checkpoint directory, initialization checkpoint, and dataset manifest in the training configuration:
The provided Accelerate configuration uses DeepSpeed ZeRO-2 and is configured for eight processes. Change num_processes in ovi/configs/train/accelerate_config.yaml to match the available GPUs.
The training objective is selected from the modality flags:
If you find InstructAV2AV or InsAVE-80K useful in your research, please cite:
bibtex
1@article{instructav2av2026,
2 title={InstructAV2AV: Instruction-Guided Audio-Video Joint Editing},
3 author={Zheng, Haojie and Yang, Yixin and Yang, Siqi and Weng, Shuchen and Shi, Boxin},
4 journal={arXiv preprint arXiv:2605.18467},
5 year={2026}
6}
License
The project is released under the Apache License 2.0. Users must also comply with the licenses and terms of the underlying pretrained models and any input media or datasets they use.