Update README.md
Browse files
README.md
CHANGED
|
@@ -1,49 +1,50 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
import
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
| 49 |
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model:
|
| 3 |
+
- stabilityai/stable-video-diffusion-img2vid-xt-1-1
|
| 4 |
+
pipeline_tag: image-to-video
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# GenEx-World-Initializer ππ
|
| 8 |
+
|
| 9 |
+
**GenEx World Explorer** is a video generation pipeline built on top of [Stable Video Diffusion (SVD)](https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1).
|
| 10 |
+
. It takes a keyframe, and generates a temporally consistent video. This explorer version builds on SVD with a custom `UNetSpatioTemporalConditionModel`.
|
| 11 |
+
|
| 12 |
+
The diffuser generate a forward moving path of a panoramic input image, to explore a given scene.
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
|
| 17 |
+
## π¦ Usage
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from diffusers import UNetSpatioTemporalConditionModel, StableVideoDiffusionPipeline
|
| 21 |
+
import torch
|
| 22 |
+
|
| 23 |
+
model_id = 'TaiMingLu/GenEx-World-Explorer'
|
| 24 |
+
|
| 25 |
+
# Load the custom UNet
|
| 26 |
+
unet = UNetSpatioTemporalConditionModel.from_pretrained(
|
| 27 |
+
model_id,
|
| 28 |
+
subfolder='unet',
|
| 29 |
+
torch_dtype=torch.float16,
|
| 30 |
+
low_cpu_mem_usage=True,
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
# Load the full pipeline with custom UNet
|
| 34 |
+
pipe = StableVideoDiffusionPipeline.from_pretrained(
|
| 35 |
+
model_id,
|
| 36 |
+
unet=unet,
|
| 37 |
+
low_cpu_mem_usage=True,
|
| 38 |
+
torch_dtype=torch.float16,
|
| 39 |
+
local_files_only=True,
|
| 40 |
+
).to('cuda')
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## π§ Requirements
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
diffusers>=0.33.1
|
| 47 |
+
transformers
|
| 48 |
+
numpy
|
| 49 |
+
pillow
|
| 50 |
```
|