🚀 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