File size: 2,016 Bytes
f645d2d
8658fd8
d043139
 
 
 
 
 
 
 
f645d2d
d043139
 
050686b
d043139
 
 
 
b060272
d043139
 
 
b060272
d043139
 
b060272
d043139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f7c7d73
d043139
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
50
51
52
53
54
55
56
57
58
---
license: creativeml-openrail-m
base_model: Bingsu/my-korean-stable-diffusion-v1-5
training_prompt: A rabbit is eating a watermelon on the table
tags:
- tune-a-video
- text-to-video
- diffusers
- korean
inference: false
---

# Tune-A-VideKO - Korean Stable Diffusion v1-5
Github: [Kyujinpy/Tune-A-VideKO](https://github.com/KyujinHan/Tune-A-VideKO/tree/master)

## Model Description
- Base model: [Bingsu/my-korean-stable-diffusion-v1-5](https://huggingface.co./Bingsu/my-korean-stable-diffusion-v1-5)
- Training prompt: A rabbit is eating a watermelon on the table
![sample-train](sample/rabbit.gif)

## Samples

![sample-500](sample/video4.gif)
Test prompt: ๊ณ ์–‘์ด๊ฐ€ ํ•ด๋ณ€์—์„œ ์ˆ˜๋ฐ•์„ ๋จน๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค

![sample-500](sample/video5.gif)
Test prompt: ๊ฐ•์•„์ง€๊ฐ€ ์˜ค๋ Œ์ง€๋ฅผ ๋จน๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค

## Usage
Clone the github repo
```bash
git clone https://github.com/showlab/Tune-A-Video.git
```

Run inference code

```python
from tuneavideo.pipelines.pipeline_tuneavideo import TuneAVideoPipeline
from tuneavideo.models.unet import UNet3DConditionModel
from tuneavideo.util import save_videos_grid
import torch

pretrained_model_path = "Bingsu/my-korean-stable-diffusion-v1-5"
unet_model_path = "kyujinpy/Tune-A-VideKO-v1-5"
unet = UNet3DConditionModel.from_pretrained(unet_model_path, subfolder='unet', torch_dtype=torch.float16).to('cuda')
pipe = TuneAVideoPipeline.from_pretrained(pretrained_model_path, unet=unet, torch_dtype=torch.float16).to("cuda")
pipe.enable_xformers_memory_efficient_attention()

prompt = "๊ฐ•์•„์ง€๊ฐ€ ๋งŒํ™” ์Šคํƒ€์ผ๋กœ ์ƒ์ž๋ฅผ ๋จน๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค"
video = pipe(prompt, video_length=8, height=512, width=512, num_inference_steps=50, guidance_scale=12.5).videos

save_videos_grid(video, f"./{prompt}.gif")
```

## Related Papers:
- [Tune-A-Video](https://arxiv.org/abs/2212.11565): One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
- [Stable Diffusion](https://arxiv.org/abs/2112.10752): High-Resolution Image Synthesis with Latent Diffusion Models