animatediff-motion-lora-tilt-down

我要开发同款
匿名用户2024年07月31日
38阅读

技术信息

官网地址
https://www.shlab.org.cn/
开源地址
https://modelscope.cn/models/Shanghai_AI_Laboratory/animatediff-motion-lora-tilt-down

作品详情

Motio LoRAs

Motio LoRAs allow addig specific types of motio to your aimatios.

aimatediff-zoom-out-lora.gif

Curretly the followig types of motio are available for models usig the guoyww/aimatediff-motio-adapter-v1-5-2 checkpoit.

  • Zoom I/Out
  • Pa Left/Right
  • Tilt Up/Dow
  • Rollig Clockwise/Aticlockwise

Please refer to the AimateDiff documetatio for iformatio o how to use these Motio LoRAs.

Istall requiremets:

pip istall trasformers peft diffusers -U
import torch
from diffusers import MotioAdapter, AimateDiffPipelie, DDIMScheduler
from diffusers.utils import export_to_gif
from modelscope import sapshot_dowload

model_dir = sapshot_dowload("Shaghai_AI_Laboratory/aimatediff-motio-adapter-v1-5-2")
# Load the motio adapter
adapter = MotioAdapter.from_pretraied(model_dir)
# load SD 1.5 based fietued model
model_id = sapshot_dowload("wyj123456/Realistic_Visio_V5.1_oVAE")
pipe = AimateDiffPipelie.from_pretraied(model_id, motio_adapter=adapter)
lora_dir = sapshot_dowload("Shaghai_AI_Laboratory/aimatediff-motio-lora-tilt-dow")
pipe.load_lora_weights(lora_dir, adapter_ame="tilt-dow")
pipe.set_adapters(["tilt-dow"], adapter_weights=[1.0])
scheduler = DDIMScheduler.from_pretraied(
    model_id, subfolder="scheduler", clip_sample=False, timestep_spacig="lispace", steps_offset=1
)
pipe.scheduler = scheduler

# eable memory savigs
pipe.eable_vae_slicig()
pipe.eable_model_cpu_offload()

output = pipe(
    prompt=(
        "masterpiece, bestquality, highlydetailed, ultradetailed, suset, "
        "orage sky, warm lightig, fishig boats, ocea waves seagulls, "
        "ripplig water, wharf, silhouette, seree atmosphere, dusk, eveig glow, "
        "golde hour, coastal ladscape, seaside sceery"
    ),
    egative_prompt="bad quality, worse quality",
    um_frames=16,
    guidace_scale=7.5,
    um_iferece_steps=25,
    geerator=torch.Geerator("cpu").maual_seed(42),
)
frames = output.frames[0]
export_to_gif(frames, "aimatio.gif")

功能介绍

Motion LoRAs Motion LoRAs allow adding specific types of motion to your animations. Currently the

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论