wan 1.3b gguf

提供商calcuis
分类text-to-video
许可证apache-2.0
下载量2.5K
星标7

简介

Wan 1.3B GGUF 是由 Calcuis 提供的轻量化视频生成模型量化版本。它将原本庞大的视频生成能力压缩至 1.3B 参数规模,并通过 GGUF 格式优化,使得普通开发者无需顶配 A100 显卡,在消费级 GPU 甚至部分大内存设备上即可尝试文本生成视频。虽然参数量较小,但它在保持基础动态效果的同时,极大降低了推理门槛。对于想要在本地部署视频工作流、或在 ComfyUI 等工具中快速迭代视频原型的用户来说,这是一个极佳的低成本入门选择。

核心亮点

  • GGUF 量化大幅降低显存占用,适配消费级显卡
  • 轻量化参数实现快速推理,适合本地视频原型开发
  • Apache-2.0 协议,对商业应用和二次开发极友好
  • 可无缝集成至支持 GGUF 的主流 AI 视频工作流

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("calcuis/wan-1.3b-gguf")
tokenizer = AutoTokenizer.from_pretrained("calcuis/wan-1.3b-gguf")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download calcuis/wan-1.3b-gguf

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download calcuis/wan-1.3b-gguf config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('calcuis/wan-1.3b-gguf')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/calcuis/wan-1.3b-gguf

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/calcuis/wan-1.3b-gguf

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('calcuis/wan-1.3b-gguf')
tokenizer = AutoTokenizer.from_pretrained('calcuis/wan-1.3b-gguf')

模型下载

我们推荐使用命令行或者 ModelScope SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 ModelScope:

操作指引
pip install modelscope

命令行下载

下载完整模型库

下载完整模型库
modelscope download --model calcuis/wan-1.3b-gguf

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)
modelscope download --model calcuis/wan-1.3b-gguf README.md --local_dir ./dir

更多更丰富的命令行下载选项,可参见具体文档

SDK 下载

SDK 下载
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('calcuis/wan-1.3b-gguf')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://www.modelscope.cn/calcuis/wan-1.3b-gguf.git

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/calcuis/wan-1.3b-gguf.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook 快速开发

下载并安装 ModelScope library

下载并安装 ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

模型加载和推理

模型加载和推理
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'calcuis/wan-1.3b-gguf')

完整文档

来源: HuggingFace

---
license: apache-2.0
language:

  • en

base_model:
  • Wan-AI/Wan2.1-VACE-1.3B

  • Wan-AI/Wan2.1-T2V-1.3B

pipeline_tag: text-to-video
tags:
  • gguf-node

  • gguf-connector

widget:
  • text: >-

a pig moving quickly in a beautiful winter scenery nature trees sunset
tracking camera
parameters:
negative_prompt: blurry ugly bad
output:
url: samples\ComfyUI_00003_.webp
  • text: >-

a pig moving quickly in a beautiful winter scenery nature trees sunset
tracking camera
parameters:
negative_prompt: blurry ugly bad
output:
url: samples\ComfyUI_00002_.webp
  • text: >-

a pig moving quickly in a beautiful winter scenery nature trees sunset
tracking camera
parameters:
negative_prompt: blurry ugly bad
output:
url: samples\ComfyUI_00001_.webp
  • text: >-

a pig moving quickly in a beautiful winter scenery nature trees sunset
tracking camera
parameters:
negative_prompt: blurry ugly bad
output:
url: samples\ComfyUI_00004_.webp
  • text: >-

a pig moving quickly in a beautiful winter scenery nature trees sunset
tracking camera
parameters:
negative_prompt: blurry ugly bad
output:
url: samples\ComfyUI_00005_.webp
  • text: >-

a pig moving quickly in a beautiful winter scenery nature trees sunset
tracking camera
parameters:
negative_prompt: blurry ugly bad
output:
url: samples\ComfyUI_00006_.webp
---

gguf quantized version of wan 1.3b models


  • run it straight with gguf-connector

  • opt a gguf file in the current directory to interact with by:

code
ggc w2

>
>GGUF file(s) available. Select which one to use:
>
>1. wan2.1-t2v-1.3b-q4_0.gguf
>2. wan2.1-t2v-1.3b-q8_0.gguf
>3. wan2.1-vace-1.3b-q4_0.gguf
>4. wan2.1-vace-1.3b-q8_0.gguf
>
>Enter your choice (1 to 4): _
>>>

run it with gguf-node via comfyui


  • drag wan to > ./ComfyUI/models/diffusion_models

  • drag umt5 to > ./ComfyUI/models/text_encoders

  • drag pig to > ./ComfyUI/models/vae

<Gallery />

review


  • wan architecture; should work on both comfyui-gguf and gguf nodes

  • full set gguf works right away (model + encoder + vae); gguf node is recommended for full gguf

  • vace model is recommended, since it doesn't need vision clip to work (for i2v and v2v) and run faster than fun model a lot, according to the initial test results

  • upgrade your node for umt5 gguf encoder support

  • note: for umt5 gguf, you might encounter oom after rebuilding your tokenizer in the first prompt (once built the tokenizer alive during the session; before you kill it); don't panic, prompt again it should work

!screenshot

reference




  • comfyui-gguf city96 (special thanks; fully compatible)



  • gguf-connector (pypi)