HeShuoSu xiguan97 commited on
Commit
b3a69d4
·
0 Parent(s):

Duplicate from sand-ai/MAGI-2-preview

Browse files

Co-authored-by: Hongyu Jia <xiguan97@users.noreply.huggingface.co>

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +40 -0
  2. README.md +214 -0
  3. preview/model-00001-of-00056.safetensors +3 -0
  4. preview/model-00002-of-00056.safetensors +3 -0
  5. preview/model-00003-of-00056.safetensors +3 -0
  6. preview/model-00004-of-00056.safetensors +3 -0
  7. preview/model-00005-of-00056.safetensors +3 -0
  8. preview/model-00006-of-00056.safetensors +3 -0
  9. preview/model-00007-of-00056.safetensors +3 -0
  10. preview/model-00008-of-00056.safetensors +3 -0
  11. preview/model-00009-of-00056.safetensors +3 -0
  12. preview/model-00010-of-00056.safetensors +3 -0
  13. preview/model-00011-of-00056.safetensors +3 -0
  14. preview/model-00012-of-00056.safetensors +3 -0
  15. preview/model-00013-of-00056.safetensors +3 -0
  16. preview/model-00014-of-00056.safetensors +3 -0
  17. preview/model-00015-of-00056.safetensors +3 -0
  18. preview/model-00016-of-00056.safetensors +3 -0
  19. preview/model-00017-of-00056.safetensors +3 -0
  20. preview/model-00018-of-00056.safetensors +3 -0
  21. preview/model-00019-of-00056.safetensors +3 -0
  22. preview/model-00020-of-00056.safetensors +3 -0
  23. preview/model-00021-of-00056.safetensors +3 -0
  24. preview/model-00022-of-00056.safetensors +3 -0
  25. preview/model-00023-of-00056.safetensors +3 -0
  26. preview/model-00024-of-00056.safetensors +3 -0
  27. preview/model-00025-of-00056.safetensors +3 -0
  28. preview/model-00026-of-00056.safetensors +3 -0
  29. preview/model-00027-of-00056.safetensors +3 -0
  30. preview/model-00028-of-00056.safetensors +3 -0
  31. preview/model-00029-of-00056.safetensors +3 -0
  32. preview/model-00030-of-00056.safetensors +3 -0
  33. preview/model-00031-of-00056.safetensors +3 -0
  34. preview/model-00032-of-00056.safetensors +3 -0
  35. preview/model-00033-of-00056.safetensors +3 -0
  36. preview/model-00034-of-00056.safetensors +3 -0
  37. preview/model-00035-of-00056.safetensors +3 -0
  38. preview/model-00036-of-00056.safetensors +3 -0
  39. preview/model-00037-of-00056.safetensors +3 -0
  40. preview/model-00038-of-00056.safetensors +3 -0
  41. preview/model-00039-of-00056.safetensors +3 -0
  42. preview/model-00040-of-00056.safetensors +3 -0
  43. preview/model-00041-of-00056.safetensors +3 -0
  44. preview/model-00042-of-00056.safetensors +3 -0
  45. preview/model-00043-of-00056.safetensors +3 -0
  46. preview/model-00044-of-00056.safetensors +3 -0
  47. preview/model-00045-of-00056.safetensors +3 -0
  48. preview/model-00046-of-00056.safetensors +3 -0
  49. preview/model-00047-of-00056.safetensors +3 -0
  50. preview/model-00048-of-00056.safetensors +3 -0
.gitattributes ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ code/assets/sample_000.png filter=lfs diff=lfs merge=lfs -text
37
+ code/assets/sample_001.png filter=lfs diff=lfs merge=lfs -text
38
+ code/assets/sample_002.png filter=lfs diff=lfs merge=lfs -text
39
+ text_encoder/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
+ code/assets/sample_000.jpeg filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-text-to-video
4
+ tags:
5
+ - text-to-video
6
+ - image-to-video
7
+ - image-text-to-video
8
+ - text-to-audio-video
9
+ - image-to-audio-video
10
+ - image-text-to-audio-video
11
+ - audio-video-generation
12
+ - multimodal
13
+ - synchronized-audio-video
14
+ - mixture-of-experts
15
+ - magi-2-preview
16
+ ---
17
+
18
+ ![magi-logo](https://raw.githubusercontent.com/SandAI-org/MAGI-1/main/figures/logo_black.png)
19
+
20
+ ---
21
+
22
+ <p align="center">
23
+ <a href="https://sand.ai"><img alt="Sand.ai Homepage" src="https://img.shields.io/badge/Sand.ai-Homepage-333333.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDgwMCA4MDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjI3IDIyNS4wODVDMjI3IDIwMi4zMDMgMjI3IDE5MC45MTIgMjMxLjQzNyAxODIuMjExQzIzNS4zMzkgMTc0LjU1NyAyNDEuNTY2IDE2OC4zMzQgMjQ5LjIyNiAxNjQuNDM0QzI1Ny45MzMgMTYwIDI2OS4zMzIgMTYwIDI5Mi4xMjkgMTYwSDUwNy44NzFDNTA5LjI5NSAxNjAgNTEwLjY3NiAxNjAgNTEyLjAxNCAxNjAuMDAxQzUzMi4wODIgMTYwLjAxNyA1NDIuNjExIDE2MC4yNzcgNTUwLjc3NCAxNjQuNDM0QzU1OC40MzQgMTY4LjMzNCA1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zA4LjcgMjI3IDI5MS4zMTkgMjI3IDI1Ni41NThWMjI1LjA4NVoiIGZpbGw9IiNGRkZGRkYiLz4KPC9zdmc+Cg=="></a>
24
+ <a href="https://sand.ai/blog/magi-2-preview"><img alt="Tech Blog" src="https://img.shields.io/badge/Tech%20Blog-MAGI--2%20Preview-333333"></a>
25
+ <a href="https://huggingface.co/sand-ai/MAGI-2-preview"><img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-MAGI--2%20Preview-ffc107"></a>
26
+ <a href="https://x.com/SandAI_HQ"><img alt="Twitter Follow"
27
+ src="https://img.shields.io/badge/Twitter-Sand.ai-white?logo=x&logoColor=white"/></a>
28
+ <a href="LICENSE"><img alt="Apache 2.0 License" src="https://img.shields.io/badge/License-Apache%202.0-green?logo=apache"></a>
29
+ </p>
30
+
31
+ # MAGI-2 Preview
32
+
33
+ Magi-2 Preview is a 114B-parameter unified audio-video generation model that
34
+ activates just 6B parameters per token. Built on MagiMoE and co-designed across
35
+ architecture, systems, and data, it explores an efficient path to scaling video
36
+ generation. The architecture, the training system built around it, and the data
37
+ pipeline are described in [MAGI-2 Preview: Scaling Video Generation Models
38
+ Efficiently](https://sand.ai/blog/magi-2-preview); the weights are on Hugging
39
+ Face at [sand-ai/MAGI-2-preview](https://huggingface.co/sand-ai/MAGI-2-preview).
40
+
41
+ This repository is the inference code. It generates video from a text prompt
42
+ (T2V) or from a prompt plus a still image (I2V), with sound generated alongside
43
+ the video and muxed into the output file. Clips are 10 seconds long, which is
44
+ the only duration the model currently supports. Generation runs in two stages:
45
+ `magi2_preview` denoises the clip at low resolution, and `magi2_refiner` takes
46
+ that result up to 1080p.
47
+
48
+ ## Requirements
49
+
50
+ - NVIDIA Hopper GPUs, 8 of them.
51
+ - Python 3.12 and a recent CUDA toolkit.
52
+ - `ffmpeg` on `PATH`, to mux the audio track. Without it the video is still
53
+ written, just silently.
54
+
55
+ ## Setup
56
+
57
+ ### Docker
58
+
59
+ The published image, [sandai/magi-2-preview](https://hub.docker.com/r/sandai/magi-2-preview),
60
+ already has the dependencies built, including the ones that need a compiler:
61
+
62
+ ```bash
63
+ docker pull sandai/magi-2-preview:latest
64
+ docker run --gpus all -it -v /path/to/ckpt:/workspace/ckpt sandai/magi-2-preview:latest
65
+ ```
66
+
67
+ There is a tag per commit as well, `sandai/magi-2-preview:<commit>`. Name that
68
+ one when reporting a result, because `latest` moves; the image also records what
69
+ it was built from in `/etc/magi2-build-info`.
70
+
71
+ Building it yourself is only necessary to change a dependency version, or to
72
+ work somewhere the registry is not reachable:
73
+
74
+ ```bash
75
+ docker build -t magi-2-preview:local .
76
+ ```
77
+
78
+ ### From source
79
+
80
+ ```bash
81
+ pip install -r requirements.txt
82
+ ```
83
+
84
+ MAGI-2 also needs [MagiAttention](https://github.com/SandAI-org/MagiAttention)
85
+ and [MagiCompiler](https://github.com/SandAI-org/MagiCompiler). The pinned
86
+ revisions are recorded as build args in the [Dockerfile](Dockerfile).
87
+
88
+ ## Checkpoints
89
+
90
+ Weights are not bundled with the code. Everything the pipeline loads lives in
91
+ one Hugging Face repository,
92
+ [sand-ai/MAGI-2-preview](https://huggingface.co/sand-ai/MAGI-2-preview), roughly
93
+ 307 GB in total. Download it into `ckpt/` in the repository root, which is
94
+ gitignored:
95
+
96
+ ```bash
97
+ pip install huggingface_hub
98
+ hf download sand-ai/MAGI-2-preview --local-dir ckpt
99
+ ```
100
+
101
+ The directory names in that repository are the ones the configs already expect,
102
+ so nothing needs renaming afterwards:
103
+
104
+ ```
105
+ ckpt/
106
+ ├── preview/ # preview stage: 56 safetensors shards + index
107
+ ├── refiner/ # refiner stage: 3 shards + index
108
+ ├── text_encoder/ # text encoder
109
+ ├── vae/ # video VAE
110
+ │ └── Wan2.2_VAE.pth
111
+ ├── stable-audio-open-1.0/ # audio VAE
112
+ └── turbo_vae/ # fast VAE decoder
113
+ ├── TurboV3-Wan22-TinyShallow_7_7.json
114
+ └── checkpoint.ckpt
115
+ ```
116
+
117
+ | Directory | Size | Contents |
118
+ | --- | --- | --- |
119
+ | `preview` | 228 GB | Preview-stage transformer, released with MAGI-2 |
120
+ | `text_encoder` | 56 GB | Text encoder, [Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B) |
121
+ | `refiner` | 14 GB | Refiner-stage transformer, released with MAGI-2 |
122
+ | `stable-audio-open-1.0` | 5 GB | Audio VAE, decodes the generated audio latents |
123
+ | `vae` | 3 GB | Video VAE, from [Wan-AI/Wan2.2-TI2V-5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B) |
124
+ | `turbo_vae` | 2 GB | Distilled VAE decoder, used for decoding by default |
125
+
126
+ The configs under [`configs/`](configs) reference these as
127
+ `${MAGI2_CKPT_ROOT}/<name>`, and that variable defaults to `<repo>/ckpt`. To keep
128
+ weights somewhere else, point it at them rather than editing the configs:
129
+
130
+ ```bash
131
+ export MAGI2_CKPT_ROOT=/data/magi2-weights
132
+ ```
133
+
134
+ ## Prompts
135
+
136
+ The captions the model was trained on are long and structured, so a prompt
137
+ written by hand underuses it. Two system prompts for a prompt-enhancement LLM
138
+ are included: [`prompts/t2v.md`](prompts/t2v.md) for text to video, and
139
+ [`prompts/i2v.md`](prompts/i2v.md) for a prompt plus a still image.
140
+
141
+ Use one as the system prompt of an instruction-following model, pass the raw
142
+ prompt as the message (the still as well, for I2V), and feed the JSON caption it
143
+ returns to the pipeline in place of the prompt. Both lay out the 10 seconds the
144
+ model generates.
145
+
146
+ [`assets/`](assets) has both ends of that step. `sample_000.txt` through
147
+ `sample_002.txt` are raw prompts, the kind you would hand to the enhancer;
148
+ [`sample_enhanced_t2v.json`](assets/sample_enhanced_t2v.json) is the shape one
149
+ comes back in. The demo batch runs both, so enhancing is not a precondition for
150
+ generating.
151
+
152
+ ## Running inference
153
+
154
+ [`scripts/run_demo.sh`](scripts/run_demo.sh) launches
155
+ [`inference/pipeline/entry.py`](inference/pipeline/entry.py) under `torchrun` on
156
+ every visible GPU. It generates at 1080p, with seed 42 and the batch in
157
+ [`assets/demo_samples.json`](assets/demo_samples.json):
158
+
159
+ ```bash
160
+ bash scripts/run_demo.sh
161
+ SAMPLES=my_samples.json bash scripts/run_demo.sh # a different batch
162
+ OUTPUT_DIR=output/run7 bash scripts/run_demo.sh
163
+ ```
164
+
165
+ The script takes `SAMPLES`, `OUTPUT_DIR`, `SEED` and `MASTER_PORT` from the
166
+ environment. Videos land in `$OUTPUT_DIR/sample_000.mp4` and up, numbered by
167
+ position in the batch.
168
+
169
+ A samples file is a JSON array with one entry per video. An entry carries its
170
+ prompt inline as `prompt` or as a path in `prompt_file`, and a first frame in
171
+ `image`; leaving `image` out makes it a T2V entry. The shipped batch runs the
172
+ three stills in `assets/` as I2V, the same three prompts again as T2V, and
173
+ `assets/sample_enhanced_t2v.json`.
174
+
175
+ For a single clip, call the entry point directly:
176
+
177
+ ```bash
178
+ torchrun --nproc_per_node=8 inference/pipeline/entry.py \
179
+ --prompt "a red fox in snow" --output output/
180
+ ```
181
+
182
+ It also takes `--prompt-file`, `--image`, `--seed`, `--config`, `--output-width`
183
+ / `--output-height`, `--num-inference-steps`, `--refiner-num-inference-steps`
184
+ and `--deterministic`. Of these only `--seed`, `--samples` and `--output` are
185
+ reachable through `run_demo.sh`.
186
+
187
+ 1080p runs [`configs/magi2_refiner.json`](configs/magi2_refiner.json): the
188
+ preview stage generates 512x896 and the refiner takes that to 1088x1920.
189
+ `magi2_refiner.json` extends
190
+ [`magi2_preview.json`](configs/magi2_preview.json) and carries only what the
191
+ refiner stage adds, so a shared setting is edited in one place.
192
+
193
+ 1080p is a delivery tier, not the shape that gets generated. The VAE stride
194
+ constrains every generated dimension to a multiple of 16, so the tier generates
195
+ 1088 wide rather than 1080, and the video is written at that generated shape.
196
+ Pass `--output-width` and `--output-height` to have the finished video rescaled
197
+ to an exact size, 1080x1920 the way the reference delivers the tier.
198
+
199
+ Four environment variables decide where each large component sits between
200
+ phases: `MAGI2_TEXT_ENC_OFFLOAD_MODE`, `MAGI2_PREVIEW_OFFLOAD_MODE`,
201
+ `MAGI2_REFINER_OFFLOAD_MODE` and `MAGI2_VAE_OFFLOAD_MODE`, each one of `cpu`,
202
+ `gpu` or `roundtrip`. The preview and the refiner default to `roundtrip`, staged
203
+ in and out around the stage that needs them, because at 1080p neither fits on an
204
+ 80GB card next to the other's activations.
205
+
206
+ Decoding uses the distilled turbo decoder from `ckpt/turbo_vae`, a temporal
207
+ sliding window that runs on one rank per video. `MAGI2_DETERMINISTIC=1`, or
208
+ `--deterministic`, makes the MoE scatter and the attention kernels bit-exact at
209
+ some cost in speed. `MAGI2_SAVE_LATENT_PATH` writes the post-refiner latent of
210
+ each sample to that directory.
211
+
212
+ ## License
213
+
214
+ Apache 2.0. See [LICENSE](LICENSE).
preview/model-00001-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:339acf244148eb11a3cb55bc053edb6e4d15495b44f67502b3ad653e060c257e
3
+ size 5359484600
preview/model-00002-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68577690617710788858fcd1d3fb90f50d2116ded5d8118d7b1b4a7e0a2b0160
3
+ size 5201648072
preview/model-00003-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc79829899b59d716abf9eb645ffd3731bb4b5710063f8376084ff12e7f6f6e5
3
+ size 4026532080
preview/model-00004-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:585244c44e841ee8b1c65f085a579c1196b74cf1239665e9809e7a26a2111dca
3
+ size 4029702712
preview/model-00005-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72d669c933548cd660c08a10519d24e885cb345f080070c33dcddd217ad2d43
3
+ size 4029702712
preview/model-00006-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf1ffcf1a123f95741bdcaca3442d862b2368b8a257f4c10310be25e203ececc
3
+ size 4026532080
preview/model-00007-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b815f43e22b1d92ff050dc2d6da7317336ca1be2f03ce615a6aa013827b9515
3
+ size 4029702712
preview/model-00008-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e5314f6ba444c55361c452eb6b6deff8644acb337d0a14ef83597beb61c2b83
3
+ size 4029702712
preview/model-00009-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:429942abc4ce8364bbbafa4a7c5d9831b69bbcd0b691964a38dc2ebebb455074
3
+ size 4026532080
preview/model-00010-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1d3aad5ead4ff747316fe1fd7ca062e9a25a330378e8a694d590b21082044ee
3
+ size 4029702712
preview/model-00011-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac49fc96a7c8545eb105c36ca849e46094ba86fa4b4800bbb37b94fe47dbfbb2
3
+ size 4029702712
preview/model-00012-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf0b296ec07f6080e485ca368c854cfa22bb08313fc979c022456799e2a896d9
3
+ size 4026532080
preview/model-00013-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3b3b9a9d53e3ef8178aaa1e53d19cff549bac2079d172997aacb4285a3be1b2
3
+ size 4029702712
preview/model-00014-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a35bcb8503010242ebbfda47f4812de53e494027b24adbadd07c568eee244923
3
+ size 4029702712
preview/model-00015-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dae3f212f200a91d1907dd4081e73780cbdb0c02de50fc771ba619069416178a
3
+ size 4026532080
preview/model-00016-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5356a7ce01f2d028086c0ca99f44569e0e75ce247a969d979a32366e5a19ae5
3
+ size 4029702712
preview/model-00017-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bd278773a179d5f251f1f566c184395f86e84bdece4c0ea2c9ed57a9fa58842
3
+ size 4029702712
preview/model-00018-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a77ed734b797cf04a36436e8010c4c53add4c6cd753dc5acd3c6d6b9824600ea
3
+ size 4026532072
preview/model-00019-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8373253320f555f5cabf83a6a43476f7a36f1ce1b2d08738354af03cd2adf15e
3
+ size 4029702712
preview/model-00020-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a8c9abbf2d4babf05f170779dd19112901230623d5b8b97a95e107b87e1cccb
3
+ size 4029702712
preview/model-00021-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff258c00fa7bcb70af7a18824ee1dff2d7aa241ca4cf406c8671a25fb7cd181d
3
+ size 4026532080
preview/model-00022-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0650b8c4a94a75c20c51477eda8546539d4c38be4acef74b52fed166e84d02c
3
+ size 4029702712
preview/model-00023-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e280bea497bb9c4b04e7ff07234f92fb4f29285f3eb4853421e30a1610f19faa
3
+ size 4029702712
preview/model-00024-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21281cf8b2f2641da080992f4c3ad51903bf3dbbac7be93e2ccb742be3b384b7
3
+ size 4026532080
preview/model-00025-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78b6c971495adab69c31bb5315c5c7f34168512d72675d4cf11b5308641efe30
3
+ size 4029702712
preview/model-00026-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ec2bfbe56c3a4d614d34cec09ef7e4dcbba0fdbe8ec8c7b87df85f553276699
3
+ size 4029702712
preview/model-00027-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04d71269ebea09fa5624c0c8ebda1f8b2dd638157cc030f0ead778f39f30b62d
3
+ size 4026532080
preview/model-00028-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:430053d877fb024690308c710bf5664d9a7cf90b2aae389684266febc59ab08d
3
+ size 4029702712
preview/model-00029-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b6323b5d90367711827be229a095ac7b0bb517b783e4adff6cf13aa278d2af9
3
+ size 4029702712
preview/model-00030-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c9fae76e56683f19a329ccaa7da5f2676d5f009bae382717e1a978e42ae5335
3
+ size 4026532080
preview/model-00031-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05976a0f08d9b37a2acf0280d9f707150746d67c6326b7095de18a27b6149c38
3
+ size 4029702712
preview/model-00032-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68b6acbf8b757ef8cdb0c9e8604372f0d30d7d3701175bfc47b495f2dab6ff1b
3
+ size 4029702712
preview/model-00033-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e829ec8f0d6f9cb8a53397e36a2405a5bdf3448d3b925a9b1ae4664d1c0ca23
3
+ size 4026532080
preview/model-00034-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8505ec3f138a7b33cd04c5bdb7eb7cfa1eccd7788a2b0dfad7bd09a42aea19b5
3
+ size 4029702712
preview/model-00035-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cae18f5e06e014849943a9605ffacaa4a65a5f3717d36e3ecf5a75ef603b60a
3
+ size 4029702704
preview/model-00036-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c81e4e0bd4568a8289c9f3ae301de7778159ee32d6c185e5a52adcd0c247819f
3
+ size 4026532080
preview/model-00037-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3eb46877b55c61cbaca2aff106b7d24089962b9d0cf9223c27953d814509474e
3
+ size 4029702712
preview/model-00038-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb3763556b9aa4420110d47fbabab8bf9faa65d2a68ed5b6d02eccfb7e5bad2e
3
+ size 4029702712
preview/model-00039-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cd5b261db00dad9aa35e454154b3ddc84578e308a360e32610221ac00611070
3
+ size 4026532080
preview/model-00040-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64da7d5a05fe233bc12762e15df9f13b3581440c9d0cbb1ed6bdd02f747c1c0d
3
+ size 4029702712
preview/model-00041-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:194bf33dc151472d25e2253aaf8f071e316a68c93dc0ccdda22cb1952ee9aef3
3
+ size 4029702712
preview/model-00042-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f5db6248f114da516f37ee3b82d19b1ec9462ae367b0e441c174bbb8fc105a1
3
+ size 4026532080
preview/model-00043-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f1664375413e27cfa05fc34dd3a8d3c80475d4db2861b3b6104d68db39dde16
3
+ size 4029702712
preview/model-00044-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e2f9687c270ca8d4a209d101745d198a60e3299553bf4bf18daf5edcdbde9d7
3
+ size 4029702712
preview/model-00045-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e6f21c58cf8dee9860cae0970b42f92255eb325140aef3de66ade812750d57c
3
+ size 4026532080
preview/model-00046-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7493bb4ff59f513fb9968f257d245191cba194fe51929220f117c89ce9fceeb2
3
+ size 4029702712
preview/model-00047-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec5f474d08e8c0808b7277886437bbdc282ae7515eda57fc779a8ebc426db270
3
+ size 4029702712
preview/model-00048-of-00056.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc7fe5326940ae819c2cadd0f37fb4b9ccf9932279c0ac76e11ef2266d8989e5
3
+ size 4026532072