|
--- |
|
license: creativeml-openrail-m |
|
base_model: nitrosocke/redshift-diffusion |
|
training_prompt: A man is skiing. |
|
tags: |
|
- tune-a-video |
|
- text-to-video |
|
- diffusers |
|
inference: false |
|
--- |
|
|
|
# Tune-A-Video - Redshift |
|
|
|
## Model Description |
|
- Base model: [nitrosocke/redshift-diffusion](https://huggingface.co./nitrosocke/redshift-diffusion) |
|
- Training prompt: a man is skiing. |
|
![sample-train](samples/train.gif) |
|
|
|
## Samples |
|
|
|
![sample-500](samples/sample-500.gif) |
|
Test prompt: (redshift style) [spider man/black widow/batman/hulk] is skiing. |
|
|
|
## Usage |
|
Clone the [github repo](https://github.com/showlab/Tune-A-Video) |
|
```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 = "nitrosocke/redshift-diffusion" |
|
unet_model_path = "Tune-A-Video-library/redshift-man-skiing" |
|
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 = "(redshift style) spider man is skiing" |
|
video = pipe(prompt, video_length=8, height=512, width=512, num_inference_steps=50, guidance_scale=7.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 |
|
|