BingoG commited on
Commit
86d7061
·
verified ·
1 Parent(s): ab749f5

Add model card

Browse files
Files changed (1) hide show
  1. README.md +64 -0
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
+ ```