Instructions to use BornFly/AsymmetricMagVitV2_4z with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BornFly/AsymmetricMagVitV2_4z with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AsymmetricMagVitV2Pipline model = AsymmetricMagVitV2Pipline.from_pretrained("BornFly/AsymmetricMagVitV2_4z", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,13 +18,13 @@ Lightweight open-source reproduction of MagVitV2, fully aligned with the paper
|
|
| 18 |
<table>
|
| 19 |
<tr>
|
| 20 |
<td width="50%">
|
| 21 |
-
<a href="https://github
|
| 22 |
-
<img src="
|
| 23 |
</a>
|
| 24 |
</td>
|
| 25 |
<td width="50%">
|
| 26 |
-
<a href="https://github
|
| 27 |
-
<img src="data/
|
| 28 |
</a>
|
| 29 |
</td>
|
| 30 |
</tr>
|
|
@@ -82,8 +82,6 @@ width=800>
|
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
## Contents
|
| 88 |
|
| 89 |
- [Installation](#installation)
|
|
@@ -201,7 +199,7 @@ input_path = "data/videos/tokyo_walk.mp4"
|
|
| 201 |
img_transform = transforms.Compose([transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
|
| 202 |
input, last_frame_id = read_video(input_path, encoder_init_window, sample_fps=8, img_transform, start=0)
|
| 203 |
|
| 204 |
-
model = AsymmetricMagVitV2Pipline.from_pretrained("BornFly/
|
| 205 |
init_z, reg_log = model.encode(input, encoder_init_window, is_init_image=True, return_reg_log=True, unregularized=False)
|
| 206 |
init_samples = model.decode(init_z.to(device, dtype), decode_batch_size=1, is_init_image=True)
|
| 207 |
|
|
|
|
| 18 |
<table>
|
| 19 |
<tr>
|
| 20 |
<td width="50%">
|
| 21 |
+
<a href="https://github.com/bornfly-detachment/asymmetric_magvitv2/assets/174133722/2ec0bc1b-7a32-4949-a68f-d512bd4c5411">
|
| 22 |
+
<img src="data/images/rexp001w1161_Increase_the_size_of_the_Bornfly_letters_on_the_lo_e754c1fa-c69c-4cd2-baf0-a7dedb72b0f7.png" alt="60s 3840x2160" style="width: 100%;">
|
| 23 |
</a>
|
| 24 |
</td>
|
| 25 |
<td width="50%">
|
| 26 |
+
<a href="https://github.com/bornfly-detachment/asymmetric_magvitv2/assets/174133722/c8df652d-e7b9-42ff-a554-1271d5a0bce1">
|
| 27 |
+
<img src="data/images/rexp001w1161_Increase_the_size_of_the_Bornfly_letters_on_the_lo_e754c1fa-c69c-4cd2-baf0-a7dedb72b0f7.png" alt="60s 1920x1080" style="width: 100%;">
|
| 28 |
</a>
|
| 29 |
</td>
|
| 30 |
</tr>
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
|
|
|
|
|
|
|
| 85 |
## Contents
|
| 86 |
|
| 87 |
- [Installation](#installation)
|
|
|
|
| 199 |
img_transform = transforms.Compose([transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
|
| 200 |
input, last_frame_id = read_video(input_path, encoder_init_window, sample_fps=8, img_transform, start=0)
|
| 201 |
|
| 202 |
+
model = AsymmetricMagVitV2Pipline.from_pretrained("BornFly/AsymmetricMagVitV2_4z").to(device, dtype).eval()
|
| 203 |
init_z, reg_log = model.encode(input, encoder_init_window, is_init_image=True, return_reg_log=True, unregularized=False)
|
| 204 |
init_samples = model.decode(init_z.to(device, dtype), decode_batch_size=1, is_init_image=True)
|
| 205 |
|