化工销售怎么做网站/广州网站优化软件

化工销售怎么做网站,广州网站优化软件,随身办app下载,做网站的可以黑客户的网站吗使用通义万相Wan2.1进行视频生成 源代码准备运行环境准备创建Python虚拟环境并激活安装依赖包 模型下载生成视频官网的视频生成例子简单描述场景视频生成示例详细描述场景视频生成示例 最近通义万相开源了其视频生成模型。模型有两个版本,一个是1.3B的,一…

使用通义万相Wan2.1进行视频生成

  • 源代码准备
  • 运行环境准备
    • 创建Python虚拟环境并激活
    • 安装依赖包
  • 模型下载
  • 生成视频
    • 官网的视频生成例子
    • 简单描述场景视频生成示例
    • 详细描述场景视频生成示例

最近通义万相开源了其视频生成模型。模型有两个版本,一个是1.3B的,一个是14B的。对于1.3B的版本,模型大小约17G,14B的版本模型大小约70G。由于显存限制,下面测试了1.3B版本的文生视频。

总体来说,1.3B的版本,实测的视频生成内容,还是有些粗糙,也许1.3B的版本,只是用于让大家熟悉和学习的。小伙伴们如果有条件的,可以测试一下14B的视频生成结果。

下面是我测试过程的一些记录,供大家参考。

源代码准备

git clone https://github.com/Wan-Video/Wan2.1.git
(base) ubuntu@ubuntu-server:~/code$ git clone https://github.com/Wan-Video/Wan2.1.git
Cloning into 'Wan2.1'...
remote: Enumerating objects: 89, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 89 (delta 13), reused 7 (delta 5), pack-reused 70 (from 1)
Receiving objects: 100% (89/89), 5.74 MiB | 1.68 MiB/s, done.
Resolving deltas: 100% (29/29), done.
(base) ubuntu@ubuntu-server:~/code$ 

运行环境准备

创建Python虚拟环境并激活

conda create -n wan python=3.10
conda activate wan

安装依赖包

pip install -r requirements.txt

安装后的依赖包信息

(wan) ubuntu@ubuntu-server:~$ pip list
Package                  Version
------------------------ -----------
accelerate               1.4.0
aiofiles                 23.2.1
aiohappyeyeballs         2.4.6
aiohttp                  3.11.13
aiosignal                1.3.2
annotated-types          0.7.0
anyio                    4.8.0
async-timeout            5.0.1
attrs                    25.1.0
certifi                  2025.1.31
charset-normalizer       3.4.1
click                    8.1.8
dashscope                1.22.1
diffusers                0.32.2
easydict                 1.13
einops                   0.8.1
exceptiongroup           1.2.2
fastapi                  0.115.8
ffmpy                    0.5.0
filelock                 3.17.0
flash_attn               2.7.4.post1
frozenlist               1.5.0
fsspec                   2025.2.0
ftfy                     6.3.1
gradio                   5.19.0
gradio_client            1.7.2
h11                      0.14.0
httpcore                 1.0.7
httpx                    0.28.1
huggingface-hub          0.29.1
idna                     3.10
imageio                  2.37.0
imageio-ffmpeg           0.6.0
importlib_metadata       8.6.1
Jinja2                   3.1.5
markdown-it-py           3.0.0
MarkupSafe               2.1.5
mdurl                    0.1.2
modelscope               1.23.1
mpmath                   1.3.0
multidict                6.1.0
networkx                 3.4.2
numpy                    1.26.4
nvidia-cublas-cu12       12.4.5.8
nvidia-cuda-cupti-cu12   12.4.127
nvidia-cuda-nvrtc-cu12   12.4.127
nvidia-cuda-runtime-cu12 12.4.127
nvidia-cudnn-cu12        9.1.0.70
nvidia-cufft-cu12        11.2.1.3
nvidia-curand-cu12       10.3.5.147
nvidia-cusolver-cu12     11.6.1.9
nvidia-cusparse-cu12     12.3.1.170
nvidia-cusparselt-cu12   0.6.2
nvidia-nccl-cu12         2.21.5
nvidia-nvjitlink-cu12    12.4.127
nvidia-nvtx-cu12         12.4.127
opencv-python            4.11.0.86
orjson                   3.10.15
packaging                24.2
pandas                   2.2.3
pillow                   11.1.0
pip                      25.0
propcache                0.3.0
psutil                   7.0.0
pydantic                 2.10.6
pydantic_core            2.27.2
pydub                    0.25.1
Pygments                 2.19.1
python-dateutil          2.9.0.post0
python-multipart         0.0.20
pytz                     2025.1
PyYAML                   6.0.2
regex                    2024.11.6
requests                 2.32.3
rich                     13.9.4
ruff                     0.9.7
safehttpx                0.1.6
safetensors              0.5.3
semantic-version         2.10.0
setuptools               75.8.0
shellingham              1.5.4
six                      1.17.0
sniffio                  1.3.1
starlette                0.45.3
sympy                    1.13.1
tokenizers               0.21.0
tomlkit                  0.13.2
torch                    2.6.0
torchvision              0.21.0
tqdm                     4.67.1
transformers             4.49.0
triton                   3.2.0
typer                    0.15.1
typing_extensions        4.12.2
tzdata                   2025.1
urllib3                  2.3.0
uvicorn                  0.34.0
wcwidth                  0.2.13
websocket-client         1.8.0
websockets               15.0
wheel                    0.45.1
yarl                     1.18.3
zipp                     3.21.0
(wan) ubuntu@ubuntu-server:~$ 

说明:

在安装flash_attn时,可能出现错误,多次尝试也不能完成。可以先在requirements.txt中先注释掉flash_attn,安装完成后,再单独安装flash_attn即可。

模型下载

下载地址

https://www.modelscope.cn/models/Wan-AI/Wan2.1-T2V-1.3B

使用modelscope客户端下载模型文件

pip install modelscopecd /home/ubuntu/code/Wan2.1modelscope download --model Wan-AI/Wan2.1-T2V-1.3B README.md --local_dir ./Wan2.1-T2V-1.3B

生成视频

官网的视频生成例子

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

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."

演示如下:

(wan) ubuntu@ubuntu-server:~/code/Wan2.1$ export CUDA_VISIBLE_DEVICES=1
(wan) ubuntu@ubuntu-server:~/code/Wan2.1$ python generate.py  --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --sample_shift 8 --sample_guide_scale 6 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
[2025-02-28 09:44:02,400] INFO: offload_model is not specified, set to True.
[2025-02-28 09:44:02,400] INFO: Generation job args: Namespace(task='t2v-1.3B', size='832*480', frame_num=81, ckpt_dir='./Wan2.1-T2V-1.3B', offload_model=True, ulysses_size=1, ring_size=1, t5_fsdp=False, t5_cpu=False, dit_fsdp=False, save_file=None, prompt='Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage.', use_prompt_extend=False, prompt_extend_method='local_qwen', prompt_extend_model=None, prompt_extend_target_lang='ch', base_seed=1470089367940419568, image=None, sample_solver='unipc', sample_steps=50, sample_shift=8.0, sample_guide_scale=6.0)
[2025-02-28 09:44:02,400] INFO: Generation model config: {'__name__': 'Config: Wan T2V 1.3B', 't5_model': 'umt5_xxl', 't5_dtype': torch.bfloat16, 'text_len': 512, 'param_dtype': torch.bfloat16, 'num_train_timesteps': 1000, 'sample_fps': 16, 'sample_neg_prompt': '色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量 ,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走', 't5_checkpoint': 'models_t5_umt5-xxl-enc-bf16.pth', 't5_tokenizer': 'google/umt5-xxl', 'vae_checkpoint': 'Wan2.1_VAE.pth', 'vae_stride': (4, 8, 8), 'patch_size': (1, 2, 2), 'dim': 1536, 'ffn_dim': 8960, 'freq_dim': 256, 'num_heads': 12, 'num_layers': 30, 'window_size': (-1, -1), 'qk_norm': True, 'cross_attn_norm': True, 'eps': 1e-06}
[2025-02-28 09:44:02,400] INFO: Input prompt: Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage.
[2025-02-28 09:44:02,400] INFO: Creating WanT2V pipeline.

视频生成时,大约占用20G的显存空间。
在这里插入图片描述

用时4分12秒,完成视频的生成。
在这里插入图片描述

视频内容如下:

CSDN对视频审核不过,不知道为什么,以gif显示。

在这里插入图片描述

截图如下:

在这里插入图片描述

简单描述场景视频生成示例

简单描述一个场景,使用百度翻译为英文。

一个人晚上开着保时捷在城市的道路上,周围是五光十色的广告和灯光。摄像头是驾驶员位置,光圈4.5,用于虚化周围的楼房和行人,汽车等。A person is driving a Porsche on the city road at night, surrounded by colorful advertisements and lights. The camera is located at the driver's position with an aperture of 4.5, used to blur surrounding buildings, pedestrians, cars, etc.

运行视频生成程序

python generate.py  --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --sample_shift 8 --sample_guide_scale 6 --prompt "A person is driving a Porsche on the city road at night, surrounded by colorful advertisements and lights. The camera is located at the driver's position with an aperture of 4.5, used to blur surrounding buildings, pedestrians, cars, etc."

大概4分钟后,生成视频文件。
在这里插入图片描述

视频生成文件如下:

CSDN对视频审核不过,不知道为什么,使用GIF显示。

在这里插入图片描述

截图如下:

在这里插入图片描述

详细描述场景视频生成示例

使用大模型生成视频描述,加入更多细节。

使用deepseek,扩写生成视频的描述文字。

将下面的场景内容扩写到500字,加入更多的细节描述,并保持场景不变,用于视频生成的描述。场景内容如下:一个人晚上开着保时捷在城市的道路上,周围是五光十色的广告和灯光。摄像头是驾驶员位置,光圈4.5,用于虚化周围的楼房和行人,汽车等。

生成内容如下:

【视频场景描述 - 夜驰光影】镜头以第一人称视角透过保时捷911 Carrera的挡风玻璃展开。仪表盘泛着宝石蓝的冷光,数字时速表在87km/h轻微震颤,转速表红色指针在4000转区域规律摆动。驾驶者戴着黑色鳄鱼皮手套的双手虚搭在Alcantara麂皮方向盘三点九点位置,左腕的铂金腕表在仪表背光中偶尔闪过金属寒光。车窗外,霓虹光流在光圈f/4.5的虚化下融化成斑斓的星轨。右侧商业街的LED巨幕正轮播着香水广告,克里斯汀·斯图尔特的面容在动态模糊中化作粉色与银白的光瀑。后视镜里,追逐的出租车顶灯在浅景深中晕染成跳动的朱红色光斑,如同都市丛林里躁动的萤火虫群。皮革缝线座椅随着过弯微微变形,能清晰看见Nappa真皮表面细小的毛孔纹路。空调出风口飘散着雪松香氛,混着方向盘后侧杯架里半杯威士忌的泥煤气息。转速突然攀升时,水平对置六缸引擎的低吼透过碳纤维车架传来,像远处闷雷滚过云层。22:17分,驶入跨江隧道。隧道壁的条形灯在高速运动中拉成金色光带,顶棚通风口的气流将驾驶者额前碎发吹起,露出被阴影覆盖的眉骨。仪表盘亮度自动调暗的瞬间,后车远光灯在前挡风玻璃上折射出彩虹光晕,如同在暴雨后的挡风玻璃上划开一道棱镜。驶出隧道的刹那,挡风玻璃突然映满璀璨星河——实为金融区摩天楼的玻璃幕墙群,每扇窗户都化作发光的矩阵单元。左侧在建大厦的塔吊亮着警示红灯,在长曝光效果中拖曳出妖冶的光弧。驾驶者左手无意识地摩挲着门把手上保时捷盾徽的浮雕纹路,右手食指在换挡拨片留下转瞬即逝的指纹。特写镜头掠过转速表突然跃升的红色指针,挡风玻璃倒影中可见驾驶者黑色衬衫袖口露出1厘米的苍白手腕。后视镜挂着的平安符在加速度中扬起45度角,金线刺绣的"安全"二字在虚焦中化作两团跃动的光晕。此刻仪表台时钟跳至22:43,车载屏幕导航显示正驶向跨海大桥方向,地图上的蓝色路径线在黑夜中如一道激光切开霓虹海洋。

使用百度翻译,将提示词翻译为英文,并进行视频生成命令。

python generate.py  --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --sample_shift 8 --sample_guide_scale 6 --prompt "The camera unfolds through the windshield of the Porsche 911 Carrera from a first person perspective. The dashboard emits a cool gemstone blue light, the digital speedometer vibrates slightly at 87km/h, and the red pointer of the tachometer swings regularly in the 4000 rpm range. The driver's hands, wearing black crocodile leather gloves, were loosely resting on the Alcantara suede steering wheel at the 3:09 o'clock position, and the platinum wristwatch on the left wrist occasionally flashed a metallic cold light in the instrument backlight. Outside the car window, the neon light flow melts into a colorful star track under the blurring of the aperture f/4.5. The LED giant screen on the right side of the commercial street is broadcasting advertisements for perfume. Kristen Stewart's face turns into pink and silver waterfall in dynamic blur. In the rearview mirror, the chasing taxi's overhead lights blend into a pulsating crimson light spot in the shallow depth of field, like a restless firefly swarm in the urban jungle. The leather stitched seat slightly deforms as it bends, and the fine pore patterns on the Nappa leather surface can be clearly seen. The air conditioning vent is filled with the fragrance of cedar, mixed with the peat smell of half a glass of whiskey in the cup holder behind the steering wheel. When the engine speed suddenly increased, the low roar of the horizontally opposed six cylinder engine came through the carbon fiber frame, like thunder rolling through the clouds in the distance. At 22:17, enter the cross river tunnel. The strip lights on the tunnel walls create a golden light strip during high-speed movement, and the airflow from the ceiling vents blows up the driver's broken hair in front of their forehead, revealing the shaded brow bones. At the moment when the brightness of the instrument panel automatically dims, the rear high beam lamp refracts a rainbow halo on the front windshield, just like a prism on the windshield after a rainstorm. At the moment of exiting the tunnel, the windshield suddenly reflected a dazzling galaxy - actually a group of glass curtain walls of the financial district skyscraper, with each window turning into a luminous matrix unit. The tower crane of the building under construction on the left is displaying a warning red light, dragging a seductive arc of light in the long exposure effect. The driver unconsciously rubbed the relief pattern of the Porsche emblem on the door handle with their left hand, and left a fleeting fingerprint on the shift paddles with their right index finger. A close-up shot passes by the red pointer on the tachometer that suddenly jumps, revealing a pale wrist of 1 centimeter on the driver's black shirt sleeve in the reflection of the windshield. The safety symbol hanging on the rearview mirror rises at a 45 degree angle in acceleration, and the gold embroidered word "safety" turns into two jumping halos in virtual focus. At this moment, the dashboard clock jumps to 22:43, and the car screen navigation shows that it is heading towards the direction of the cross sea bridge. The blue path line on the map cuts through the neon ocean like a laser in the dark night."

在这里插入图片描述

视频生成文件:

CSDN对视频审核不过,不知道为什么,用GIF显示。

在这里插入图片描述

截图如下

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/72150.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【MATLAB例程】三维下的IMM(交互式多模型),模型使用CV(匀速)和CA(匀加速)

给出三维下的交互式多模型(IMM)matlab例程,模型使用匀速运动CV和匀加速运动CA,滤波使用EKF(扩展卡尔曼滤波) 文章目录 代码运行结果程序结构 代码讲解模型定义:轨迹生成:IMM核心流程…

物理内存组织与分配的核心概念

在 Linux 内核内存管理(尤其是 Buddy System 伙伴系统)中,node、zone、type 和 order 是描述物理内存组织与分配的核心概念。以下是它们的详细解释: 1. Node(NUMA 节点) 定义: 在 NUMA&#xf…

postman--接口测试工具安装和使用教程

postman–接口测试工具 postman是一款支持http协议的接口调试与测试工具,其主要特点就是功能强大,使用简单且易用性好 。 无论是开发人员进行接口调试,还是测试人员做接口测试,postman都是我们的首选工具之一 。 下面先通过一张…

综合练习 —— 递归、搜索与回溯算法

目录 一、1863. 找出所有子集的异或总和再求和 - 力扣(LeetCode) 算法代码: 代码思路 问题分析 核心思想 实现细节 代码解析 初始化 DFS 函数 时间复杂度 空间复杂度 示例运行 输入 运行过程 总结 二、 47. 全排列 II - 力扣&a…

代码随想录算法训练day64---图论系列8《拓扑排序dijkstra(朴素版)》

代码随想录算法训练 —day64 文章目录 代码随想录算法训练前言一、53. 117. 软件构建—拓扑排序二、47. 参加科学大会---dijkstra(朴素版)总结 前言 今天是算法营的第64天,希望自己能够坚持下来! 今天继续图论part!今…

学术小助手智能体

学术小助手:开学季的学术领航员 文心智能体平台AgentBuilder | 想象即现实 文心智能体平台AgentBuilder,是百度推出的基于文心大模型的智能体平台,支持广大开发者根据自身行业领域、应用场景,选取不同类型的开发方式,…

本地大模型编程实战(26)用langgraph实现基于SQL数据构建的问答系统(5)

本文将将扩展上一篇文章完成的 langgraph 链,继续使用基于 langgraph 链 ,对结构化数据库 SQlite 进行查询的方法。该系统建立以后,我们不需要掌握专业的 SQL 技能,可以用自然语言询问有关数据库中数据的问题并返回答案。主要完善…

FASIONAD:自适应反馈的类人自动驾驶中快速和慢速思维融合系统

24年11月来自清华、早稻田大学、明尼苏达大学、多伦多大学、厦门大学马来西亚分校、电子科大(成都)、智平方科技和河南润泰数字科技的论文“FASIONAD : FAst and Slow FusION Thinking Systems for Human-Like Autonomous Driving with Adaptive Feedbac…

【免费】YOLO[笑容]目标检测全过程(yolo环境配置+labelimg数据集标注+目标检测训练测试)

一、yolo环境配置 这篇帖子是我试过的,非常全,很详细【cudaanacondapytorchyolo(ultralytics)】 yolo环境配置 二、labelimg数据集标注 可以参考下面的帖子,不过可能会出现闪退的问题,安装我的流程来吧 2.1 labelimg安装 label…

Linux系统软件管理

systemctl 控制软件启动和关闭 Linux系统很多软件支持使用systemctl命令控制:启动,停止,开启自启。 能被systemctl管理的软件,一般被称为:服务。 语法:systemctl start|stop|status|enable|disable 服务名…

CAN总线通信协议学习1——物理层

首先来看看CAN是怎么产生的:简单理解,CAN就是一种“拥有特别连接方式”的数据传输的总线,其有特定的一些规则。 (注:资料及图片来源于知乎博主TOMOCAT。) CAN总线的结构 查阅参考文献,OSI标准…

【Mac电脑本地部署Deepseek-r1:详细教程与Openwebui配置指南】

文章目录 前言电脑配置:安装的Deepseek版本:使用的UI框架:体验效果展示:本地部署体验总结 部署过程Ollama部署拉取模型运行模型Openwebui部署运行Ollama服务在Openwebui中配置ollama的服务 后话 前言 deepseek最近火的一塌糊涂&a…

给小白的oracle优化工具,了解一下

有时懒得分析或语句太长,可以尝试用oracle的dbms_sqldiag包进行sql优化, --How To Use DBMS_SQLDIAG To Diagnose Query Performance Issues (Doc ID 1386802.1) --诊断SQL 性能 SET ECHO ON SET LINESIZE 132 SET PAGESIZE 999 SET LONG 999999 SET SER…

YOLO11改进加入ResNet网络

文章目录 1.改进目的2.demo引入2.1代码2.2 结果展示2.3 BottleNeck详解 1.改进目的 原始YOLO11模型训练好以后,检测结果mAP结果很低,视频检测结果很差,于是想到改进网络,这里介绍改进主干网络。 2.demo引入 2.1代码 # File: 2…

【大数据】ClickHouse常见的错误及解决方式

ClickHouse 是一款高性能的列式数据库,但在使用过程中难免会遇到一些错误。本文将介绍一些 ClickHouse 常见的错误及其解决方式,帮助您更好地使用 ClickHouse。 1、错误:DB::Exception 错误信息 DB::Exception:Table engine Distributed d…

IP-----动态路由OSPF

这只是IP的其中一块内容,IP还有更多内容可以查看IP专栏,前一章内容为GRE和MGRE ,可通过以下路径查看IP-------GRE和MGRE-CSDN博客,欢迎指正 注意!!!本部分内容较多所以分成了两部分在下一章 5.动态路由OS…

数字内容体验未来趋势:交互升级与用户深耕

智能技术重塑内容交互 随着数字内容体验进入深度智能化阶段,AI驱动的内容生成与智能推荐算法正在重构用户与信息的交互范式。基于自然语言处理技术的内容创作工具,已实现从文本自动生成到多模态内容适配的跨越,企业能够以分钟级速度产出符合…

2025年2月21日优雅草内测分发站全新升级-测试运营-优雅草内测分发站新用户提供免费100下载点-2月28日正式运营并且提供私有化部署版本

2025年2月21日优雅草内测分发站全新升级-测试运营-优雅草内测分发站新用户提供免费100下载点-2月28日正式运营并且提供私有化部署版本 说明 优雅草内测分发站新用户提供免费100下载点,优雅草分运营站和demo测试站 运营站:www.youyacao.cn 提供免费100…

【洛谷贪心算法】P1106删数问题

这道题可以使用贪心算法来解决,核心思路是尽量让高位的数字尽可能小。当我们逐步删除数字时,会优先删除高位中相对较大的数字。具体做法是从左到右遍历数字序列,当发现当前数字比它后面的数字大时,就删除当前数字,直到…

开源PDF解析工具olmOCR

olmOCR 是由 Allen Institute for Artificial Intelligence (AI2) 的 AllenNLP 团队开发的一款开源工具,旨在将PDF文件和其他文档高效地转换为纯文本,同时保留自然的阅读顺序。它支持表格、公式、手写内容等。 olmOCR 经过学术论文、技术文档和其他文档…