🚀 Tune-A-VideKO-anything
Tune-A-VideKO-anything是一个基于特定基础模型训练的文本到视频生成模型,能依据输入的文本生成具有现代迪士尼风格的视频,可应用于创意视频制作等场景。
🚀 快速开始
克隆代码仓库
git clone https://github.com/showlab/Tune-A-Video.git
运行推理代码
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 = "kyujinpy/KO-stable-diffusion-disney"
unet_model_path = "kyujinpy/Tune-A-VideKO-disney"
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=14, height=512, width=512, num_inference_steps=50, guidance_scale=7.5).videos
save_videos_grid(video, f"./{prompt}.gif")
✨ 主要特性
📦 安装指南
克隆项目代码仓库:
git clone https://github.com/showlab/Tune-A-Video.git
💻 使用示例
基础用法
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 = "kyujinpy/KO-stable-diffusion-disney"
unet_model_path = "kyujinpy/Tune-A-VideKO-disney"
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=14, height=512, width=512, num_inference_steps=50, guidance_scale=7.5).videos
save_videos_grid(video, f"./{prompt}.gif")
📚 详细文档
模型描述
示例展示
测试提示:토끼가 기타를 치고 있습니다, 모던한 디즈니 스타일
测试提示:잘생긴 왕자가 기타를 치고 있습니다, 모던한 디즈니 스타일
测试提示:사자가 기타를 치고 있습니다, 모던한 디즈니 스타일
相关论文
- Tune-A-Video:One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
- Stable Diffusion:High-Resolution Image Synthesis with Latent Diffusion Models
📄 许可证
本模型使用的许可证为 creativeml-openrail-m。
Github链接:Kyujinpy/Tune-A-VideKO