Instructions to use BingoG/SpatialAV2AV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LTX.io
How to use BingoG/SpatialAV2AV with LTX.io:
# Install the LTX-2 pipelines git clone https://github.com/Lightricks/LTX-2.git cd LTX-2 uv sync --frozen
# Download the weights from this repo, plus the Gemma text encoder hf download BingoG/SpatialAV2AV --local-dir models/SpatialAV2AV hf download google/gemma-3-12b-it-qat-q4_0-unquantized --local-dir models/gemma-3-12b
# Fast pipeline (distilled model, no distilled LoRA needed) uv run python -m ltx_pipelines.distilled \ --distilled-checkpoint-path models/SpatialAV2AV/<distilled-checkpoint>.safetensors \ --spatial-upsampler-path models/SpatialAV2AV/<spatial-upsampler>.safetensors \ --gemma-root models/gemma-3-12b \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8# HQ pipeline (two-stage, higher quality) uv run python -m ltx_pipelines.ti2vid_two_stages_hq \ --checkpoint-path models/SpatialAV2AV/<checkpoint>.safetensors \ --distilled-lora models/SpatialAV2AV/<distilled-lora>.safetensors 0.8 \ --spatial-upsampler-path models/SpatialAV2AV/<spatial-upsampler>.safetensors \ --gemma-root models/gemma-3-12b \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8 - Notebooks
- Google Colab
- Kaggle
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
library_name: ltx
|
| 4 |
+
tags:
|
| 5 |
+
- spatial-audio
|
| 6 |
+
- audio-visual
|
| 7 |
+
- stereo
|
| 8 |
+
- binaural
|
| 9 |
+
- video-editing
|
| 10 |
+
- ltx
|
| 11 |
+
- ltx-2
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# SpatialAV2AV — Weights
|
| 15 |
+
|
| 16 |
+
Full fine-tuned transformer weights for **spatial (binaural / stereo) audio-video editing**
|
| 17 |
+
on top of **LTX-2.3 (22B)**. The model learns
|
| 18 |
+
`source (pre-edit sound field + video) + camera-trajectory instruction → edit (target sound field + video)`,
|
| 19 |
+
producing **real 2-channel stereo** audio (L≠R) whose spatial image follows the camera motion.
|
| 20 |
+
|
| 21 |
+
Trained on the [`BingoG/LTX`](https://huggingface.co/datasets/BingoG/LTX) dataset
|
| 22 |
+
(source→edit pairs, same clip rendered under different camera trajectories via Binamix HRTF).
|
| 23 |
+
|
| 24 |
+
## Repository layout
|
| 25 |
+
|
| 26 |
+
Each checkpoint lives in its own `step_XXXXX/` folder with an `INFO.md` recording the
|
| 27 |
+
training run, step, loss, format, and inference usage.
|
| 28 |
+
|
| 29 |
+
| Folder | Step | Notes |
|
| 30 |
+
|--------|------|-------|
|
| 31 |
+
| [`step_04000/`](step_04000) | 4000 / 20000 | **Latest & recommended** — best tested checkpoint (run `2026.06.19-17.33.11`) |
|
| 32 |
+
|
| 33 |
+
## ⚠️ Important: the file is torch-pickle, NOT safetensors
|
| 34 |
+
|
| 35 |
+
The weight file is named `model_weights_step_04000.safetensors` **but it is actually a
|
| 36 |
+
`torch.save` (zip/pickle) file**, not a real safetensors container. This is a known quirk of
|
| 37 |
+
the trainer (it uses `accelerator.save`, which writes torch format under a `.safetensors` name).
|
| 38 |
+
|
| 39 |
+
- ❌ `safetensors.torch.load_file(...)` → **fails with `HeaderTooLarge`**.
|
| 40 |
+
- ✅ Load with `torch.load(...)` and inject into the base LTX-2.3 transformer via
|
| 41 |
+
`load_state_dict(..., strict=False)` (verified `missing=0 unexpected=0`).
|
| 42 |
+
|
| 43 |
+
The project's `SpatialAV2AV_inference.py --full_weights <file>` path already does this correctly.
|
| 44 |
+
|
| 45 |
+
## Usage (inference)
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
# base model + text encoder are the stock LTX-2.3 assets (not in this repo)
|
| 49 |
+
python packages/ltx-trainer/scripts/SpatialAV2AV_inference.py \
|
| 50 |
+
--checkpoint <LTX-2.3/ltx-2.3-22b-dev.safetensors> \
|
| 51 |
+
--full_weights step_04000/model_weights_step_04000.safetensors \
|
| 52 |
+
--text_encoder_path <gemma-3-12b-it-...> \
|
| 53 |
+
--meta_json <...>+pan_right.json \
|
| 54 |
+
--output out_pan_right.mp4 \
|
| 55 |
+
--num_frames 113 --min_size 288 --steps 20 --guidance_scale 4.0 --seed 42
|
| 56 |
+
# prints "双声道 L≠R? True" on success
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Download just one checkpoint folder:
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
from huggingface_hub import snapshot_download
|
| 63 |
+
d = snapshot_download("BingoG/SpatialAV2AV", allow_patterns="step_04000/*")
|
| 64 |
+
```
|