当前位置: 首页 > wzjs >正文

秦皇岛电子网站建设视频推广方案模板

秦皇岛电子网站建设,视频推广方案模板,曹县网站建设公司,wordpress 内容注入开源的风吹到视频生成:阿里开源登顶VBench的万相大模型 1.先从github上下载源码,或者下载zip解压:2.下载模型3.按照官方指令进行推理4.输入prompt,生成对应的视频 话不多说,看看标题就知道: 1.先从github上下载源码,或…

开源的风吹到视频生成:阿里开源登顶VBench的万相大模型

  • 1.先从github上下载源码,或者下载zip解压:
  • 2.下载模型
  • 3.按照官方指令进行推理
  • 4.输入prompt,生成对应的视频

=话不多说,看看标题就知道:=

1.先从github上下载源码,或者下载zip解压:

git clone https://github.com/Wan-Video/Wan2.1

2.下载模型

from modelscope import snapshot_download# 指定模型名称
model_name = "Wan-AI/Wan2.1-T2V-1.3B"# 指定下载路径(绝对路径)
custom_path = "Wan2.1-T2V-1.3B"# 下载模型
model_dir = snapshot_download(model_name,  # 模型名称cache_dir=custom_path,  # 指定下载路径revision="master"  # 可选:指定模型版本(默认master))print(f"模型已下载到:{model_dir}")

3.按照官方指令进行推理

python generate.py  --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --offload_model True --t5_cpu --sample_shift 8 --sample_guide_scale 6 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."

本人做了三个个改动:
1.用–t5_cpu参数会将文本编码器放到CPU上跑,但是在CPU上跑文本编码也是很慢的,因此先在GPU上跑,然后在源码上torch.cuda.empty_cache()清理掉缓存,就快了很多
在这里插入图片描述
2.由于很多机器,比如V100或者2080Ti,或多或少都不支持flash_attention。只需要在源码的model.py将flash_attention替换成from .attention import attention as flash_attention就可以了

# 源码
# from .attention import flash_attention
#替换成
from .attention import attention as flash_attention

3.这个一个意想不到的问题,windows上不支持用号明明文件,如果用源码跑完会保存不了mp4,因此需要将替换掉。如在generate.py文件中将*号替换成X

args.save_file = args.save_file.replace("*", "X")

4.输入prompt,生成对应的视频

prompt:

In a realistic close-up shot with smooth camera movement, a charming woman is seen outdoors on a grassy lawn. She is wearing a white shirt paired with a white jacket, and she adorns a necklace and earrings, adding elegance to her appearance. The woman is gracefully walking around an area enclosed by a wooden fence, moving in a gentle arc as she walks past the fence. The background features a lush green lawn and tent-like structures, creating a serene and refreshing atmosphere. The lighting is ample, highlighting the natural beauty of the scene.

效果视频:
在这里插入图片描述
在这里插入图片描述

http://www.dtcms.com/wzjs/65107.html

相关文章:

  • python网站开发免费发布网站seo外链
  • 做哪些网站流量大网站优化什么意思
  • 网站设计报价单关键词吉他谱
  • 做网站图标的软件个人怎么做百度竞价
  • 做一个b2b网站网站设计公司建设网站
  • 做网上竞猜网站合法吗seo优化公司排名
  • 宁夏网站建设电话进入百度首页官网
  • 广西医疗网站建设肇庆seo按天收费
  • 设计个网站多少钱军事新闻头条最新消息
  • 学做粤菜的网站域名注册后怎么使用
  • 网站如何做404页面简述搜索引擎的工作原理
  • 哪里有做网站开发排名优化课程
  • 建设网站参数微博今日热搜榜
  • 烟台网站建设求职简历深圳关键词排名优化系统
  • 项目外包 网站开发31省市新增疫情最新消息
  • 网站建设套模版精准推广引流5000客源
  • 企业营销网站建设的基本步骤怎么做优化关键词
  • 网站建设功能需求网络整合营销案例
  • 做任务兼职赚钱的网站广告投放优化师
  • 杭州软件定制开发广州 关于进一步优化
  • 制作表白网页seo排名点击手机
  • dz怎么做视频网站如何引流被动加好友微信
  • 做企业公示的数字证书网站东莞市网络营销公司
  • 公司企业网站软文推广的好处
  • 深圳高端网站制作公司seo流量
  • 内蒙网网站移动端优化工具
  • 做网站 兼职网络广告的优势有哪些
  • 深圳市建设厅网站搜索引擎优化期末考试答案
  • 美橙建站之星怎么样人民日报最新头条10条
  • 菏泽手机网站建设软文类型