Hotshot-XL 文本生成动图

我要开发同款
匿名用户2024年07月31日
32阅读
所属分类aipytorch、Stable Diffusion、Text to GIF、Text to Video、GIF
开源地址https://modelscope.cn/models/zcmaas/cv_hotshot-xl_text-to-gif_base
授权协议Apache License 2.0

作品详情

模型描述 (Model Description)

Hotshot-XL是一种基于Stable Diffusion XL的文本转GIF模型,详情可参考来源

a barbie doll smiling in kitchen, oven on fire, disaster, pink wes anderson vibes, cinematic   a teddy bear writing a letter   dslr photo of mark zuckerberg happy, pulling on threads, lots of threads everywhere, laughing, hd, 8k   a cat laughing  

运行环境 (Operating environment)

Dependencies and Installation

# git clone the original repository
git clone https://github.com/hotshotco/Hotshot-XL.git
cd Hotshot-XL

# Create a conda environment and activate it
conda create -n hotshotxl python=3.9
conda activate hotshotxl

# Install from requirements.txt
pip install -r requirements.txt

代码范例 (Code example)

from modelscope.models import Model
from modelscope.pipelines import pipeline

input = {
    'output': 'output.gif', 
    'prompt': 'a bulldog in the captains chair of a spaceship, hd, high quality', 
    'negative_prompt': 'blurry', 
    'steps': 30, 
    'seed': 455, 
    'width': 672, 
    'height': 384, 
    'target_width': 512, 
    'target_height': 512, 
    'og_width': 1920, 
    'og_height': 1080, 
    'video_length': 8, 
    'video_duration': 1000, 
    'low_vram_mode': False, 
    'controlnet_conditioning_scale': 0.7, 
    'control_guidance_start': 0.0, 
    'control_guidance_end': 1.0, 
    'gif': None, 
}
model = Model.from_pretrained('zcmaas/cv_hotshot-xl_text-to-gif_base',
            control_type=None, 
            spatial_unet_base=None, 
            lora=None,
            scheduler='EulerAncestralDiscreteScheduler',
            precision='f16')
inference = pipeline('hotshotxl-task', model=model)
output = inference(input)
print(f'The result is saved as {output}.')
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论