chengzeyi commited on
Commit
cb57d9f
·
verified ·
1 Parent(s): 2eda323

Add files using upload-large-folder tool

Browse files
Files changed (3) hide show
  1. README.md +51 -0
  2. config.yaml +15 -0
  3. model.pth +3 -0
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ovi FusionModel - FP8 Quantized
2
+
3
+ This is the Ovi FusionModel quantized with FP8 (e4m3_e4m3_dynamic_per_tensor) for faster inference.
4
+
5
+ ## Quantization Details
6
+
7
+ - **Video Model Blocks**: 30 blocks quantized
8
+ - **Audio Model Blocks**: 30 blocks quantized
9
+ - **Attention/FFN layers**: e4m3_e4m3_dynamic_per_tensor
10
+ - **Other layers**: e4m3_weightonly
11
+
12
+ ## Usage
13
+
14
+ ```python
15
+ import sys
16
+ import os
17
+ import torch
18
+ from omegaconf import OmegaConf
19
+ from huggingface_hub import hf_hub_download
20
+
21
+ OVI_PATH = "./workspace/Ovi"
22
+ sys.path.insert(0, OVI_PATH)
23
+ os.chdir(OVI_PATH)
24
+
25
+ from ovi.ovi_fusion_engine import OviFusionEngine
26
+
27
+ # Download quantized weights
28
+ model_path = hf_hub_download(
29
+ repo_id="wavespeed/Ovi-e4m3_e4m3_dynamic_per_tensor",
30
+ filename="model.pth"
31
+ )
32
+
33
+ config = OmegaConf.load("config.yaml")
34
+ engine = OviFusionEngine(config=config, device="cuda", target_dtype=torch.bfloat16)
35
+
36
+ # Load quantized weights
37
+ engine.model.load_state_dict(torch.load(model_path))
38
+
39
+ # Model is already quantized, ready for inference
40
+ ```
41
+
42
+ ## Model Card
43
+
44
+ - **Developed by**: Alibaba/Character.AI
45
+ - **Model type**: Video + Audio generation (FusionModel)
46
+ - **Quantization**: FP8 (e4m3_e4m3_dynamic_per_tensor)
47
+ - **License**: Check original Ovi repository
48
+
49
+ ## Original Model
50
+
51
+ Based on [Ovi](https://github.com/character-ai/Ovi)
config.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ckpt_dir: /home/zeyi/repos/model-deploy/workspace/Ovi/ckpts
2
+ mode: t2v
3
+ output_dir: /tmp
4
+ seed: 0
5
+ solver_name: unipc
6
+ num_steps: 20
7
+ shift: 5.0
8
+ video_guidance_scale: 4.0
9
+ audio_guidance_scale: 3.0
10
+ slg_layer: 11
11
+ video_negative_prompt: ''
12
+ audio_negative_prompt: ''
13
+ each_example_n_times: 1
14
+ sp_size: 1
15
+ cpu_offload: false
model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8a7c2509b5439ca10a29e154b031718778712dd9b8c7c044dc7ee59278048f3
3
+ size 12377521691