mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-06-02 05:17:25 +00:00
Add a pyproject and a separate INSTALL.md (#137)
* Add a pyproject and a detailled separate installation file with a poetry installation to not overcharge the readme * update mail
This commit is contained in:
parent
b58b7c5737
commit
0f816057da
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,3 +34,4 @@ Wan2.1-T2V-14B/
|
||||
Wan2.1-T2V-1.3B/
|
||||
Wan2.1-I2V-14B-480P/
|
||||
Wan2.1-I2V-14B-720P/
|
||||
poetry.lock
|
54
INSTALL.md
Normal file
54
INSTALL.md
Normal file
@ -0,0 +1,54 @@
|
||||
# Installation Guide
|
||||
|
||||
## Install with pip
|
||||
|
||||
```bash
|
||||
pip install .
|
||||
pip install .[dev] # Installe aussi les outils de dev
|
||||
```
|
||||
|
||||
## Install with Poetry
|
||||
|
||||
Ensure you have [Poetry](https://python-poetry.org/docs/#installation) installed on your system.
|
||||
|
||||
To install all dependencies:
|
||||
|
||||
```bash
|
||||
poetry install
|
||||
```
|
||||
|
||||
### Handling `flash-attn` Installation Issues
|
||||
|
||||
If `flash-attn` fails due to **PEP 517 build issues**, you can try one of the following fixes.
|
||||
|
||||
#### No-Build-Isolation Installation (Recommended)
|
||||
```bash
|
||||
poetry run pip install --upgrade pip setuptools wheel
|
||||
poetry run pip install flash-attn --no-build-isolation
|
||||
poetry install
|
||||
```
|
||||
|
||||
#### Install from Git (Alternative)
|
||||
```bash
|
||||
poetry run pip install git+https://github.com/Dao-AILab/flash-attention.git
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Running the Model
|
||||
|
||||
Once the installation is complete, you can run **Wan2.1** using:
|
||||
|
||||
```bash
|
||||
poetry run python generate.py --task t2v-14B --size '1280x720' --ckpt_dir ./Wan2.1-T2V-14B --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
|
||||
```
|
||||
|
||||
#### Test
|
||||
```bash
|
||||
pytest tests/
|
||||
```
|
||||
#### Format
|
||||
```bash
|
||||
black .
|
||||
isort .
|
||||
```
|
64
pyproject.toml
Normal file
64
pyproject.toml
Normal file
@ -0,0 +1,64 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "wan"
|
||||
version = "2.1.0"
|
||||
description = "Wan: Open and Advanced Large-Scale Video Generative Models"
|
||||
authors = [
|
||||
{ name = "Wan Team", email = "wan.ai@alibabacloud.com" }
|
||||
]
|
||||
license = { file = "LICENSE.txt" }
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10,<4.0"
|
||||
dependencies = [
|
||||
"torch>=2.4.0",
|
||||
"torchvision>=0.19.0",
|
||||
"opencv-python>=4.9.0.80",
|
||||
"diffusers>=0.31.0",
|
||||
"transformers>=4.49.0",
|
||||
"tokenizers>=0.20.3",
|
||||
"accelerate>=1.1.1",
|
||||
"tqdm",
|
||||
"imageio",
|
||||
"easydict",
|
||||
"ftfy",
|
||||
"dashscope",
|
||||
"imageio-ffmpeg",
|
||||
"flash_attn",
|
||||
"gradio>=5.0.0",
|
||||
"numpy>=1.23.5,<2"
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest",
|
||||
"black",
|
||||
"flake8",
|
||||
"isort",
|
||||
"mypy",
|
||||
"huggingface-hub[cli]"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://wanxai.com"
|
||||
documentation = "https://github.com/Wan-Video/Wan2.1"
|
||||
repository = "https://github.com/Wan-Video/Wan2.1"
|
||||
huggingface = "https://huggingface.co/Wan-AI/"
|
||||
modelscope = "https://modelscope.cn/organization/Wan-AI"
|
||||
discord = "https://discord.gg/p5XbdQV7"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["wan"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 88
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[tool.mypy]
|
||||
strict = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user