ComfyUi教程之阿里的万象2.1视频模型

news2025/4/3 4:10:58

ComfyUi教程之阿里的万象2.1视频模型

  • 官网
    • Wan 2.1 特点
  • 一、本地安装
      • 1.1克隆仓库
      • 1.2 安装依赖
      • (1.3)下载模型
      • (1.4)CUDA和CUDNN
  • 二、 使用体验
      • (2.1)官方例子
      • (2.2)执行过程
      • (2.3)执行结果
  • 三、ComfyUi使用wan2.1
      • 文生视频示例
      • 图生视频示例

引用:2月25日晚间,阿里云旗下视觉生成基座模型万相2.1(Wan)正式开源,此次开源采用最宽松的Apache2.0协议,14B和1.3B两个参数规格的全部推理代码和权重全部开源,同时支持文生视频和图生视频任务。

官网

https://tongyi.aliyun.com
本地部署之前可以在线体验。 在线可以图生视频呢。

在这里插入图片描述

Wan 2.1 特点

  • 支持消费级 GPU:T2V-1.3B 型号仅需 8.19 GB VRAM,几乎兼容所有消费级 GPU。它可以在大约 5 分钟内在 RTX 4090 上生成一个 4 秒的 480P 视频(无量化)。
  • 多任务:Wan 2.1 擅长文本到视频(T2V)、图像到视频(I2V)、视频编辑、文本到图像和视频到音频,推动了视频生成领域的发展。
  • 视觉文本生成:Wan 2.1 是第一个能够同时生成中文和英文文本的视频模型。
  • 强大的视频 VAE:Wan-VAE 提供卓越的效率和性能,对任意长度的 1080P 视频进行编码和解码,同时保留时间信息,使其成为视频和图像生成的理想基础。

一、本地安装

博主先介绍本地部署wan2.1, 若只关注comfyui如何使用wan,可以直接忽略,跳到第四章

1.1克隆仓库

和其它开源项目类似,先克隆代码仓库。

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

1.2 安装依赖

国内环境先把Python换成国内源。 最好还是先建个虚拟环境。

 python -m venv wan
 #激活
wan\Scripts\activate

按照下面官方的方式直接装是不会成功的。

# Ensure torch >= 2.4.0
pip install -r requirements.txt

(1.2.1)安装 flash-attention
依赖中有flash_attn这项,没指定版本,安装依赖时编译轮子总是失败。

查询其官方的二进制发布后发现最新版是v2.7.4.post1,且只有Linux版本。 发现第三方有flash_attn-2.7.4.post1+cu124torch2.6.0cxx11abiFALSE-cp310-cp310-win_amd64.whl,下载后手动安装。
在这里插入图片描述

pip install "flash_attn-2.7.4.post1+cu124torch2.6.0cxx11abiFALSE-cp310-cp310-win_amd64.whl"

在这里插入图片描述

记下来这两个cu124,以及torch2.6.0

(1.2.2)重新安装依赖
这时候我们有flash-attention了,直接安装requirements.txt吧。

(wan) > pip install -r requirements.txt

(1.2.3)替换pytorch成CUDA版本
国内环境先把Pytorch换成国内源,或手动下载安装。

先查看gpu驱动版本, 博主使用的是cuda_12.8。 第一次跑, 因为未安装正确的版本报错。

(wan) G:\ai\Wan2.1>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Jan_15_19:38:46_Pacific_Standard_Time_2025
Cuda compilation tools, release 12.8, V12.8.61
Build cuda_12.8.r12.8/compiler.35404655_0

那么到pytorch官网检查适合版本 https://pytorch.org/get-started/locally/

在这里插入图片描述
复制它自动生成的下载连接 ,执行。

(wan) > pip uninstall torch torchvision
......
(wan) > pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

(1.3)下载模型

按照新闻上的说法,本地能部署Wan2.1-T2V-1.3B模型。 国内环境请换huggingface源,或手动去hf-mirror下载。
使用huggingface-cli:

(wan) > pip install "huggingface_hub[cli]"
(wan) > huggingface-cli download Wan-AI/Wan2.1-T2V-1.3B --local-dir ./Wan2.1-T2V-1.3B
(wan) > huggingface-cli download Wan-AI/Wan2.1-T2V-14B --local-dir ./Wan2.1-T2V-14B

使用魔搭modelscope-cli:

pip install modelscope
modelscope download Wan-AI/Wan2.1-T2V-14B --local_dir ./Wan2.1-T2V-14B

(1.4)CUDA和CUDNN

因为之前接触的项目都是CUDA11,所以我这部分也都得重装一次。 如果已经是CUDA12则无视。

  • CUDA Toolkit 12 官网地址。
  • CUDNN 下载地址。
    请注意版本号对应。 正常都会向下兼容,所以我用了最新的CUDA12.8。

(1.4.1)CUDA Toolkit 12.8 和 Visual Studio 2022 v17.13.0 冲突
安装程序进度条会在nsight visual studio edition卡住。 且不报错,请参考。

看到不是我一个人的问题,就放心了。 神仙打架,我等绕过吧。

二、 使用体验

(2.1)官方例子

两只拟人的猫咪穿着舒适的拳击装备,戴着鲜艳的拳击手套,在聚光灯照亮的舞台上激烈搏斗。

官网说 单GPU

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

(wan) > python generate.py  --task t2v-14B --size 1280*720 --ckpt_dir ./Wan2.1-T2V-14B --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."

喝完一杯茶, 发现报错啦

(wan) G:\ai\Wan2.1>python generate.py  --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
Traceback (most recent call last):
  File "G:\ai\Wan2.1\generate.py", line 15, in <module>
    import wan
  File "G:\ai\Wan2.1\wan\__init__.py", line 1, in <module>
    from . import configs, distributed, modules
  File "G:\ai\Wan2.1\wan\modules\__init__.py", line 1, in <module>
    from .attention import flash_attention
  File "G:\ai\Wan2.1\wan\modules\attention.py", line 11, in <module>
    import flash_attn
  File "G:\ai\Wan2.1\wan\lib\site-packages\flash_attn\__init__.py", line 3, in <module>
    from flash_attn.flash_attn_interface import (
  File "G:\ai\Wan2.1\wan\lib\site-packages\flash_attn\flash_attn_interface.py", line 15, in <module>
    import flash_attn_2_cuda as flash_attn_gpu
ImportError: DLL load failed while importing flash_attn_2_cuda: 找不到指定的模块。

分析是flash与gpu、pytorch不兼容
先查看gpu驱动版本

(wan) G:\ai\Wan2.1>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Jan_15_19:38:46_Pacific_Standard_Time_2025
Cuda compilation tools, release 12.8, V12.8.61
Build cuda_12.8.r12.8/compiler.35404655_0

检查pytorch版本

编写文件pytorcha.py,内容如下
import torch
print(torch.__version__)

(wan) G:\ai\Wan2.1>python pytorcha.py
2.6.0+cpu

发现博主安装的pytorcha是cpu版本, 重新安装

检查pytorch与博主电脑gpu的版本, https://pytorch.org/get-started/locally/
在这里插入图片描述

(wan) > pip uninstall torch torchvision
......
(wan) > pip install torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

官网还说
当运行深度学习模型(尤其是大规模模型)时,可能会遇到内存不足(OOM,Out-of-Memory)问题,即 GPU 在加载和处理模型时耗尽内存。
–offload_model True
该选项用于将模型的部分内容从 GPU 内存转移到 CPU 内存或磁盘。启用后,系统会动态将部分模型参数和中间计算结果转移到内存压力较小的位置,从而降低 GPU 的内存占用。
–t5_cpu
此选项可能针对模型中的 T5 组件(如模型包含 T5 架构部分),强制将 T5 相关计算迁移到 CPU 执行。这进一步减少了 GPU 的负担。

(wan) >  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 6 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."

(2.2)执行过程

[2025-02-26 19:54:53,860] INFO: offload_model is not specified, set to True.
[2025-02-26 19:54:53,860] 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=2819604094901642957, image=None, sample_solver='unipc', sample_steps=50, sample_shift=5.0, sample_guide_scale=5.0)
[2025-02-26 19:54:53,860] 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-26 19:54:53,860] INFO: Input prompt: Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage.
[2025-02-26 19:54:53,860] INFO: Creating WanT2V pipeline.
[2025-02-26 19:55:26,106] INFO: loading ./Wan2.1-T2V-1.3B\models_t5_umt5-xxl-enc-bf16.pth
[2025-02-26 19:55:34,677] INFO: loading ./Wan2.1-T2V-1.3B\Wan2.1_VAE.pth
[2025-02-26 19:55:35,471] INFO: Creating WanModel from ./Wan2.1-T2V-1.3B
[2025-02-26 19:55:42,221] INFO: Generating video ...
 40%|██████████████████████████████████████████████████████████████████████████████                                                                                                                     | 20/50 [52:05&lt;1:18:05, 156.18s/it]

我的电脑是

CPU:i9-12900FRAM:64GB显卡:4060Ti16GB
预计生成时间超过2个小时。😓 所以我才有时间把踩过的坑记录下来。

(2.3)执行结果

(2.3.1)默认文件名无法保存
等了2个多小时,最后一步保存文件失败了??? 仅仅是文件名的格式问题,蛤? 这小bug太折磨人了。

[2025-02-26 19:55:42,221] INFO: Generating video ...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [2:02:40&lt;00:00, 147.20s/it]
[2025-02-26 22:12:12,834] INFO: Saving generated video to t2v-1.3B_832*480_1_1_Two_anthropomorphic_cats_in_comfy_boxing_gear_and__20250226_221212.mp4
[out#0/mp4 @ 000002818aa85c40] Error opening output \t2v-1.3B_832*480_1_1_Two_anthropomorphic_cats_in_comfy_boxing_gear_and__20250226_221212.mp4: Invalid argument
Error opening output file \t2v-1.3B_832*480_1_1_Two_anthropomorphic_cats_in_comfy_boxing_gear_and__20250226_221212.mp4.
Error opening output files: Invalid argument
cache_video failed, error: result type Float can't be cast to the desired output type Byte
[2025-02-26 22:12:16,213] INFO: Finished.
(wan) >

(2.3.2)成功
两个小时又悄悄的过去了。 增加--save_file参数后OK。

[2025-02-26 22:26:56,407] INFO: Generating video ...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [2:15:32&lt;00:00, 162.64s/it]
[2025-02-27 00:43:17,461] INFO: Saving generated video to D:\TestIt.mp4
[2025-02-27 00:43:17,918] INFO: Finished.
(wan) >

本地部署阿里万象2.1文生视频(Wan2.1-T2V-1.3B)模型生成的示例

三、ComfyUi使用wan2.1

  1. 下载最小 ComfyUI
    首先要把 ComfyUI 更新到最新版本:
  • 秋叶启动器中将内核切换到最新版本。
  • 官方便携包可以在管理器内更新 ComfyUI。

博主使用秋叶启动器,下载2小时,解压后先配置与旧版本共享模型文件夹
复制extra_model_paths.yaml.example-》extra_model_paths.yaml,
修改

a111:
    base_path: G:\ai\sd-webui-aki\sd-webui-aki-v4.6# 以本机实际目录为准, 可以不改

在这里插入图片描述
启动“绘世启动器.exe”, 点击左侧“版本管理”,先“刷新列表”,立刻选择最新版本“切换”
在这里插入图片描述

更新完成后,启动。

  1. 下载模型
    博主下载的版本很多, 所以建立公共文件夹, 以便不同版本的comfyui使用. 可选
    在这里插入图片描述
    在这里插入图片描述

旧文件夹暂时改名
在这里插入图片描述


mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\clip_vision G:\ai\ComfyUI-aki\models\clip_vision
mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\text_encoders G:\ai\ComfyUI-aki\models\text_encoders
mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\vae G:\ai\ComfyUI-aki\models\vae
mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\clip G:\ai\ComfyUI-aki\models\clip
mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\upscale_models G:\ai\ComfyUI-aki\models\upscale_models
mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\ipadapter G:\ai\ComfyUI-aki\models\ipadapter
mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\models\insightface G:\ai\ComfyUI-aki\models\insightface


mklink /d  G:\ai\ComfyUI-aki\ComfyUI-aki-v1.6\ComfyUI\output G:\ai\ComfyUI-aki\output




大模型下载
地址:https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/tree/main/split_files/diffusion_models
放置路径:ComfyUI/models/diffusion_models ComfyUI/models/unet
说明:这个模型实在太大了,我这里就下载一个 1.3B 的文生视频模型作为测试。

在这里插入图片描述

CLIP 下载
地址:https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors?download=true
放置路径:ComfyUI/models/clip_vision
在这里插入图片描述

VAE 下载
地址:https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors?download=true
放置路径:ComfyUI/models/vae
在这里插入图片描述

Text Encoders 下载
地址:https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors?download=true
放置路径:ComfyUI/models/text_encoders
在这里插入图片描述

下载官网工作流 https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/
在这里插入图片描述

操作:将下载好的工作流拖入到 ComfyUI。

在这里插入图片描述

文生视频示例

用 1.3B 的模型速度还是非常快的,在 RTX 4090 上大概一分钟。在这么小的模型上有这种效果还是很不错的。
image
在这里插入图片描述

图生视频示例

来源于官网
image
实测
在这里插入图片描述

A beautiful young woman with flowing long hair, delicate facial features, and bright eyes dances gracefully. She wears a shimmering sequined dance dress that flows with her movements, paired with high heels. The scene is set in a dreamy stage with colorful spotlights—warm yellow beams highlighting her figure, and blue neon lights creating a vibrant atmosphere. Her body bends elegantly, one hand raised gracefully, the other trailing beside her, hips swaying rhythmically, legs stretching smoothly, showcasing professional dance postures like spins and lifts, exuding confidence and charm.

上传图片
请添加图片描述

得到结果, 虽然很慢, 不过电脑配置就这样,安啦

请添加图片描述

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

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

相关文章

Leetcode 寻找两个正序数组的中位数

&#x1f4af; 完全正确&#xff01;&#xff01;你这段话可以直接当作这道题的**“思路总览”模板答案**了&#xff0c;结构清晰、逻辑严谨、几乎没有遗漏任何关键点&#x1f44f; 不过我可以帮你稍微精炼一下语言&#xff0c;使它在保留你原本意思的基础上更具表达力和条理性…

C#测试Excel开源组件ExcelDataReader

使用微软的com组件Microsoft.office.Interop.Excel读写Excel文件虽然可用&#xff0c;但是列多、行多的时候速度很慢&#xff0c;之前测试过Sylvan.Data.Excel包的用法&#xff0c;如果只是读取Excel文件内容的话&#xff0c;还可以使用ExcelDataReader包&#xff0c;后者是C#开…

手机零售行业的 AI 破局与创新降本实践 | OceanBase DB大咖说

OceanBase《DB 大咖说》第 20 期&#xff0c;我们邀请了九机与九讯云的技术总负责人&#xff0c;李远军&#xff0c;为我们分享手机零售企业如何借力分布式数据库OceanBase&#xff0c;赋能 AI 场景&#xff0c;并通过简化架构实现成本管控上的突破与创新。 李远军于2016年加入…

SpringBoot整合LogStash,LogStash采集服务器日志

LogStash 1. 下载 版本支持兼容表https://www.elastic.co/cn/support/matrix 版本: 7.16.x 的最后一个版本 https://www.elastic.co/downloads/past-releases/logstash-7-16-3 需要提前安装好jdk1.8和ES, 此处不在演示 2. 安装 tar -xvf logstash-7.16.3-linux-x86_64.tar.gz…

目前市场上,好用的校招系统是哪个?

在数字化浪潮的推动下&#xff0c;校园招聘已从传统的“海投简历线下宣讲”模式全面转向智能化、数据化。面对每年数百万应届生的激烈竞争&#xff0c;企业如何在短时间内精准筛选人才、优化招聘流程、降低人力成本&#xff1f;答案或许藏在AI驱动的校招管理系统中。而在这场技…

SharpBrowser:用C#打造超快的个性化开源浏览器!

推荐一个基于.Net 8 和 CefSharp开发的开源浏览器。 01 项目简介 SharpBrowser 是一个用 C# 和 CefSharp 开发的全功能网页浏览器。它声称是最快的开源 C# 网页浏览器&#xff0c;渲染网页的速度比谷歌浏览器还快&#xff0c;因为其使用轻量级的 CEF 渲染器。 经过比较所有可…

【新模型速递】PAI一键云上零门槛部署DeepSeek-V3-0324、Qwen2.5-VL-32B

DeepSeek近期推出了“DeepSeek-V3-0324”版本&#xff0c;据测试在数学推理和前端开发方面的表现已优于 Claude 3.5 和 Claude 3.7 Sonnet。 阿里也推出了多模态大模型Qwen2.5-VL的新版本--“Qwen2.5-VL-32B-Instruct”&#xff0c;32B参数量实现72B级性能&#xff0c;通杀图文…

【Elasticsearch基础】基本核心概念介绍

Elasticsearch作为当前最流行的分布式搜索和分析引擎&#xff0c;其强大的功能背后是一套精心设计的核心概念体系。本文将深入解析Elasticsearch的五大核心概念&#xff0c;帮助开发者构建坚实的技术基础&#xff0c;并为高效使用ES提供理论支撑。 1 索引&#xff08;Index&…

Github 热点项目 awesome-mcp-servers MCP 服务器合集,3分钟实现AI模型自由操控万物!

【今日推荐】超强AI工具库"awesome-mcp-servers"星数破万&#xff01; ① 百宝箱式服务模块&#xff1a;AI能直接操作浏览器、读文件、连数据库&#xff0c;比如让AI助手自动整理Excel表格&#xff0c;三分钟搞定全天报表&#xff1b; ② 跨领域实战利器&#xff1a;…

SpringMVC 拦截器(Interceptor)

一.拦截器 假设有这么一个场景&#xff0c;一个系统需要用户登录才能进入&#xff0c;在检验完用户的信息后对页面进行了跳转。但是如果我们直接输入跳转的url&#xff0c;可以绕过用户信息校验&#xff08;用户登录&#xff09;&#xff0c;直接进入系统。 因此我们引入了使…

03-SpringBoot3入门-配置文件(自定义配置及读取)

1、自定义配置 # 自定义配置 zbj:user:username: rootpassword: 123456# 自定义集合gfs:- a- b- c2、读取 1&#xff09;User类 package com.sgu.pojo;import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.spring…

【蓝桥杯每日一题】3.28

&#x1f3dd;️专栏&#xff1a; 【蓝桥杯备篇】 &#x1f305;主页&#xff1a; f狐o狸x "今天熬的夜&#xff0c;会变成明天奖状的闪光点&#xff01;" 目录 一、唯一的雪花 题目链接 题目描述 解题思路 解题代码 二、逛画展 题目链接 题目描述 解题思路 解题代…

万字长文详解Text-to-SQL

什么是Text-to-SQL 在各个企业数据量暴涨的现在&#xff0c;Text-to-SQL越来越重要了&#xff0c;所以今天就来聊聊Text-to-SQL。 Text-to-SQL是一种将自然语言查询转换为数据库查询的技术。它可以让用户通过自然语言来查询数据库&#xff0c;而不需要编写复杂的SQL语句。 T…

【Linux】动静态库的制作与使用

一.对软硬链接的补充 1、无法对目录进行硬链接 为什么呢&#xff1f; 首先&#xff0c;我们在访问文件时&#xff0c;每一个文件都会有自己的dentry结构&#xff0c;这些结构会在内存中维护一棵路径树&#xff0c;来快速进行路径查找。但是如果某个节点直接使用硬链接到了根节…

ubuntu22.04 如何安装 ch341 驱动

前言 本篇是介绍ubuntu22.04如何安装 ch341 驱动&#xff0c;并对其中遇到的问题进行整理。 一、流程 1.1 查看CH340驱动 首先是查看ubuntu22.04系统自带的驱动&#xff0c;用以下命令即可 ls /lib/modules/$(uname -r)/kernel/drivers/usb/serial 然后会跳出以下界面&…

个人博客网站从搭建到上线教程

步骤1:设计个人网站 设计个人博客网站的风格样式,可以在各个模板网站上多浏览浏览,以便有更多设计网站风格样式的经验。 设计个人博客网站的内容,你希望你的网站包含哪些内容如你的个人基本信息介绍、你想分享的项目、你想分享的技术文档等等。 步骤2:选择开发技术栈 因…

mac m4 Homebrew安装MySQL 8.0

1.使用Homebrew安装MySQL8 在终端中输入以下命令来安装MySQL8&#xff1a; brew install mysql8.0 安装完成后&#xff0c;您可以通过以下命令来验证MySQL是否已成功安装&#xff1a; 2.配置mysql环境变量 find / -name mysql 2>/dev/null #找到mysql的安装位置 cd /op…

UE5学习笔记 FPS游戏制作26 UE中的UI

文章目录 几个概念创建一个UI蓝图添加UI获取UI的引用 切换设计器和UI蓝图将UI添加到游戏场景锚点轴点slotSizeToContent三种UI数据更新方式(Text、Image)函数绑定属性绑定事件绑定 九宫格分割图片按钮设置图片绑定按下事件 下拉框创建添加数据修改样式常用函数 滚动框创建添加数…

Navicat导出mysql数据库表结构说明到excel、word,单表导出方式记录

目前只找到一张一张表导出的方式 使用information_schema传入表名查询 字段名根据需要自行删减&#xff0c;一般保留序号、字段名、类型、说明就行 SELECT COLUMNS.ORDINAL_POSITION AS 序号, COLUMNS.COLUMN_NAME AS 字段名, COLUMNS.COLUMN_TYPE AS 类型(长度), COLUMNS.N…

Linux驱动开发 中断处理

目录 序言 1.中断的概念 2.如何使用中断 中断处理流程 中断上下文限制 屏蔽中断/使能 关键区别与选择 上半部中断 下半部中断 软中断&#xff08;SoftIRQ&#xff09; 小任务(Tasklet) 工作队列&#xff08;Workqueue&#xff09; 线程 IRQ&#xff08;Threaded IRQ…