ExVideo
ExVideo 是一项视频生成模型的后训练技术,旨在通过后训练增强模型的生成能力。我们在 Stable Video Diffusion 的基础上进行了扩展,使其能够生成 128 帧长视频。
这是我们公开的第一个模型,由于计算资源限制,这个模型仅在约 4 万视频上使用 8 x A100 训练了一周左右,因此模型有时会生成不符合现实规律的内容,还请期待我们后续的模型发布。
使用方式
from diffsynth import save_video, ModelManager, SVDVideoPipeline
import torch, requests
from PIL import Image
# Load models
model_manager = ModelManager(torch_dtype=torch.float16, device="cuda",
model_id_list=["stable-video-diffusion-img2vid-xt", "ExVideo-SVD-128f-v1"])
pipe = SVDVideoPipeline.from_model_manager(model_manager)
# Generate a video
torch.manual_seed(0)
image = Image.open(requests.get("https://www.modelscope.cn/api/v1/studio/ECNU-CILab/ExVideo-SVD-128f-v1/repo?Revision=master&FilePath=images%2F0.png", stream=True).raw)
image.save("image.png")
video = pipe(
input_image=image.resize((512, 512)),
num_frames=128, fps=30, height=512, width=512,
motion_bucket_id=127,
num_inference_steps=50,
min_cfg_scale=2, max_cfg_scale=2, contrast_enhance_scale=1.2
)
save_video(video, "video.mp4", fps=30)
请参考 DiffSynth 获取更多信息。
样例展示
|||||
|-|-|-|-|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
评论