Skip to content
Python

add linux support

Chris Malone956d91504ca5
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..507148a
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+clear
+echo "======================================================"
+echo " WAN2GP INSTALLER MENU"
+echo "======================================================"
+echo "1. Use 'venv' (Easiest - Comes prepackaged)"
+echo "2. Use 'uv' (Recommended - Fast)"
+echo "3. Use 'Conda'"
+echo "4. No Environment (Not Recommended)"
+echo "5. Exit"
+echo "------------------------------------------------------"
+read -p "Select an option (1-4): " choice
+
+if [ "$choice" == "1" ]; then
+ ENV_TYPE="venv"
+elif [ "$choice" == "2" ]; then
+ ENV_TYPE="uv"
+ if ! command -v uv &> /dev/null; then
+ echo "[!] 'uv' not found."
+ echo "Installing uv..."
+ curl -LsSf https://astral.sh/uv/install.sh | sh
+ source $HOME/.cargo/env
+ fi
+elif [ "$choice" == "3" ]; then
+ ENV_TYPE="conda"
+elif [ "$choice" == "4" ]; then
+ ENV_TYPE="none"
+else
+ exit 0
+fi
+
+python3 setup.py install --env $ENV_TYPE
+echo "Installation complete. Run ./run.sh to start."
+read -p "Press Enter to exit..."
\ No newline at end of file
diff --git a/run.sh b/run.sh
new file mode 100644
index 0000000..f5a3b04
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+python3 setup.py run
+read -p "Press Enter to exit..."
\ No newline at end of file
diff --git a/setup_config.json b/setup_config.json
index 503434e..c3d6fd9 100644
--- a/setup_config.json
+++ b/setup_config.json
@@ -5,36 +5,118 @@
"3.11": { "ver": "3.11.14", "label": "Python 3.11.14 (Recommended)" }
},
"torch": {
- "cu126": { "label": "Torch 2.6.0 + CUDA 12.6", "cmd": "torch==2.6.0+cu126 torchvision==0.21.0+cu126 torchaudio==2.6.0+cu126 --index-url https://download.pytorch.org/whl/cu126" },
- "cu128": { "label": "Torch 2.7.1 + CUDA 12.8", "cmd": "torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128" },
- "cu130": { "label": "Torch 2.10.0 + CUDA 13.0 (Nvidia Recommended)", "cmd": "torch==2.10.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130" },
- "rocm65": { "label": "ROCm 6.5 (TheRock) for AMD Windows", "cmd": "https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torch-2.7.0a0+rocm_git3f903c3-cp311-cp311-win_amd64.whl https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torchvision-0.22.0+9eb57cd-cp311-cp311-win_amd64.whl https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torchaudio-2.7.0a0+52638ef-cp311-cp311-win_amd64.whl" }
+ "cu126": {
+ "label": "Torch 2.6.0 + CUDA 12.6",
+ "cmd": "torch==2.6.0+cu126 torchvision==0.21.0+cu126 torchaudio==2.6.0+cu126 --index-url https://download.pytorch.org/whl/cu126"
+ },
+ "cu128": {
+ "label": "Torch 2.7.1 + CUDA 12.8",
+ "cmd": "torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128"
+ },
+ "cu130": {
+ "label": "Torch 2.10.0 + CUDA 13.0",
+ "cmd": "torch==2.10.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130"
+ },
+ "rocm65": {
+ "label": "ROCm 6.5 (TheRock)",
+ "cmd": {
+ "win": "https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torch-2.7.0a0+rocm_git3f903c3-cp311-cp311-win_amd64.whl https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torchvision-0.22.0+9eb57cd-cp311-cp311-win_amd64.whl https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torchaudio-2.7.0a0+52638ef-cp311-cp311-win_amd64.whl",
+ "linux": "torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2"
+ }
+ }
},
"triton": {
- "v33": { "label": "Triton-Windows < 3.3", "cmd": "-U \"triton-windows<3.3\"" },
- "v34": { "label": "Triton-Windows < 3.4", "cmd": "-U \"triton-windows<3.4\"" },
- "latest": { "label": "Triton-Windows Latest", "cmd": "-U triton-windows" }
+ "v33": {
+ "label": "Triton < 3.3",
+ "cmd": {
+ "win": "-U \"triton-windows<3.3\"",
+ "linux": "-U \"triton<3.3\""
+ }
+ },
+ "v34": {
+ "label": "Triton < 3.4",
+ "cmd": {
+ "win": "-U \"triton-windows<3.4\"",
+ "linux": "-U \"triton<3.4\""
+ }
+ },
+ "latest": {
+ "label": "Triton Latest",
+ "cmd": {
+ "win": "-U triton-windows",
+ "linux": "-U triton"
+ }
+ }
},
"sage": {
"v1": { "label": "Sage Attention 1.0.6", "cmd": "sageattention==1.0.6" },
- "v211": { "label": "Sage Attention 2.1.1 (CUDA 12.6/Py3.10)", "cmd": "https://github.com/woct0rdho/SageAttention/releases/download/v2.1.1-windows/sageattention-2.1.1+cu126torch2.6.0-cp310-cp310-win_amd64.whl" },
- "v220": { "label": "Sage Attention 2.2.0 (CUDA 12.8/Py3.10)", "cmd": "https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows/sageattention-2.2.0+cu128torch2.7.1-cp310-cp310-win_amd64.whl" },
- "v220_cu13": { "label": "Sage Attention 2.2.0 (CUDA 13.0/Py3.11)", "cmd": "https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post4/sageattention-2.2.0+cu130torch2.9.0andhigher.post4-cp39-abi3-win_amd64.whl" }
+ "v211": {
+ "label": "Sage Attention 2.1.1",
+ "cmd": {
+ "win": "https://github.com/woct0rdho/SageAttention/releases/download/v2.1.1-windows/sageattention-2.1.1+cu126torch2.6.0-cp310-cp310-win_amd64.whl",
+ "linux": "pip install \"setuptools<=75.8.2\" && git clone https://github.com/thu-ml/SageAttention && pip install -e SageAttention"
+ }
+ },
+ "v220": {
+ "label": "Sage Attention 2.2.0",
+ "cmd": {
+ "win": "https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows/sageattention-2.2.0+cu128torch2.7.1-cp310-cp310-win_amd64.whl",
+ "linux": "pip install \"setuptools<=75.8.2\" && git clone https://github.com/thu-ml/SageAttention && pip install -e SageAttention"
+ }
+ },
+ "v220_cu13": {
+ "label": "Sage Attention 2.2.0 (CUDA 13)",
+ "cmd": {
+ "win": "https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post4/sageattention-2.2.0+cu130torch2.9.0andhigher.post4-cp39-abi3-win_amd64.whl",
+ "linux": "pip install \"setuptools<=75.8.2\" && git clone https://github.com/thu-ml/SageAttention && pip install -e SageAttention"
+ }
+ }
},
"flash": {
- "v271": { "label": "Flash Attention 2.7.4 (CUDA 12.8/Py3.10)", "cmd": "https://github.com/Redtash1/Flash_Attention_2_Windows/releases/download/v2.7.0-v2.7.4/flash_attn-2.7.4.post1+cu128torch2.7.0cxx11abiFALSE-cp310-cp310-win_amd64.whl" },
- "v210": { "label": "Flash Attention 2.8.3 (CUDA 13.0/Py3.11)", "cmd": "https://github.com/deepbeepmeep/kernels/releases/download/Flash2/flash_attn-2.8.3-cp311-cp311-win_amd64.whl" }
+ "v27": {
+ "label": "Flash Attention 2.7.x",
+ "cmd": {
+ "win": "https://github.com/Redtash1/Flash_Attention_2_Windows/releases/download/v2.7.0-v2.7.4/flash_attn-2.7.4.post1+cu128torch2.7.0cxx11abiFALSE-cp310-cp310-win_amd64.whl",
+ "linux": "flash-attn==2.7.2.post1"
+ }
+ },
+ "v210": {
+ "label": "Flash Attention 2.8.x",
+ "cmd": {
+ "win": "https://github.com/deepbeepmeep/kernels/releases/download/Flash2/flash_attn-2.8.3-cp311-cp311-win_amd64.whl",
+ "linux": "flash-attn"
+ }
+ }
},
"kernels": {
- "nunchaku": { "label": "Nunchaku INT4/FP4 (Py3.10)", "cmd": "https://github.com/deepbeepmeep/kernels/releases/download/v1.2.0_Nunchaku/nunchaku-1.2.0+torch2.7-cp310-cp310-win_amd64.whl" },
- "light2xv": { "label": "Light2xv NVFP4 (Py3.11 - RTX 50xx Only)", "cmd": "https://github.com/deepbeepmeep/kernels/releases/download/Light2xv/lightx2v_kernel-0.0.2+torch2.10.0-cp311-abi3-win_amd64.whl" }
+ "nunchaku": {
+ "label": "Nunchaku INT4/FP4",
+ "cmd": {
+ "win": "https://github.com/deepbeepmeep/kernels/releases/download/v1.2.0_Nunchaku/nunchaku-1.2.0+torch2.7-cp310-cp310-win_amd64.whl",
+ "linux": "https://github.com/deepbeepmeep/kernels/releases/download/v1.2.0_Nunchaku/nunchaku-1.2.0+torch2.7-cp310-cp310-linux_x86_64.whl"
+ }
+ },
+ "nunchaku_cu13": {
+ "label": "Nunchaku INT4/FP4 (CUDA 13)",
+ "cmd": {
+ "win": "https://github.com/nunchaku-ai/nunchaku/releases/download/v1.2.1/nunchaku-1.2.1+cu13.0torch2.10-cp310-cp310-win_amd64.whl",
+ "linux": "https://github.com/nunchaku-ai/nunchaku/releases/download/v1.2.1/nunchaku-1.2.1+cu13.0torch2.10-cp310-cp310-linux_x86_64.whl"
+ }
+ },
+ "light2xv": {
+ "label": "Light2xv NVFP4 (RTX 50xx)",
+ "cmd": {
+ "win": "https://github.com/deepbeepmeep/kernels/releases/download/Light2xv/lightx2v_kernel-0.0.2+torch2.10.0-cp311-abi3-win_amd64.whl",
+ "linux": "https://github.com/deepbeepmeep/kernels/releases/download/Light2xv/lightx2v_kernel-0.0.2+torch2.10.0-cp311-abi3-linux_x86_64.whl"
+ }
+ }
}
},
"gpu_profiles": {
"GTX_10": { "python": "3.10", "torch": "cu126", "triton": null, "sage": null, "flash": null, "kernels": [] },
"RTX_20": { "python": "3.10", "torch": "cu126", "triton": "v33", "sage": "v1", "flash": null, "kernels": [] },
"RTX_30": { "python": "3.10", "torch": "cu126", "triton": "v33", "sage": "v211", "flash": null, "kernels": [] },
- "RTX_40": { "python": "3.10", "torch": "cu128", "triton": "v34", "sage": "v220", "flash": "v271", "kernels": ["nunchaku"] },
+ "RTX_40": { "python": "3.10", "torch": "cu128", "triton": "v34", "sage": "v220", "flash": "v27", "kernels": ["nunchaku"] },
"RTX_50": { "python": "3.11", "torch": "cu130", "triton": "latest", "sage": "v220_cu13", "flash": "v210", "kernels": ["light2xv"] },
"AMD_GFX110X": { "python": "3.11", "torch": "rocm65", "triton": null, "sage": null, "flash": null, "kernels": [], "env": {"HSA_OVERRIDE_GFX_VERSION": "11.0.0"} },
"AMD_GFX1151": { "python": "3.11", "torch": "rocm65", "triton": null, "sage": null, "flash": null, "kernels": [], "env": {"HSA_OVERRIDE_GFX_VERSION": "11.5.1"} },
diff --git a/update.sh b/update.sh
new file mode 100644
index 0000000..8acd9d1
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+clear
+echo "======================================================"
+echo " WAN2GP UPDATE / UPGRADE"
+echo "======================================================"
+echo "1. Simple Update (git pull + pip requirements)"
+echo "2. Upgrade (Upgrade Torch, Triton, Sage Attention, etc.)"
+echo "3. Platform Migration (Upgrade to Py 3.11/Torch 2.10)"
+echo "4. Exit"
+echo "------------------------------------------------------"
+read -p "Select an option (1-4): " choice
+
+if [ "$choice" == "1" ]; then
+ python3 setup.py update
+elif [ "$choice" == "2" ]; then
+ python3 setup.py upgrade
+elif [ "$choice" == "3" ]; then
+ echo "[!] This will rebuild your environment with Python 3.11/Torch 2.10"
+ python3 setup.py migrate
+else
+ exit 0
+fi
+read -p "Press Enter to exit..."
\ No newline at end of file