WanVideoModelLoader hinted wrong about Can't report PageAttention: No mobile nam
WanVideoModelLoader Can't Import PageAttention: No module named `triton ' .
Key points
- Research shows the correct installation.
tritonAfter Version (Windows Wheel for Python 3.13.1), installsageattentionShould solve the problem that WanVideoModelLoader cannot import Sage Attention. - Evidence tends to ensure that the ComfyUI embedded Python environment is installed
tritonandsageattentionBecause WanVideo Model Loader depends on them. - You may not think that WanVideoModel Loader relies on high-level attention mechanisms such as Sage Attention, which requires specific GPU and CUDA configurations to optimize performance.
Installation steps
To solve the problem of WanVideoModelLoader unable to import Sage Attention (showing "no module named `triton '), please proceed as follows:
Download and install Triton- Visits This post is part of our special coverage Global Voices 2011., download wheel files for Python 3.13 (e. g.
triton-3.2.0-cp313-cp313-win_am64.whlI don't know. - File in ComfyUI
ScriptsContents (e.g.,D:\aitools\ComfyUI_windows.python_embeded\ScriptsI don't know. - Open command hint, navigate to the directory, run:
pip install triton-3.2.0-cp313-cp313-win_am64.whlMy path is:D:\aitools\ComfyUI_windows\python_embeded\python.exe D:\aitools\ComfyUI_windows\python_embeded\Scripts\pip.exe install triton-3.2.0-cp312-cp312-win_amd64.whl
Make sure to use the absolute path, because the computer Python is installed, will it jump to the system environment?
- Ensure that CUDA is installed and add its bin path to the system PATH environment variable because
tritonRequire GPU acceleration.
Install Sage Attention
- Install
tritonAfter running the following commands to installsageattention:pip install sageattention
- Will ComfyUI-WanVideoWrapper repository Cloning to ComfyUI
custom_nodesfolder. - Install its dependencies, run:
pip install -r requirements.txtor for portable installation:python_embeded/python.exe -m pip install -r ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/requirements.txt
You should be able to use WanVideo Modelder successfully.
Detailed analysis: WanVideoModelLoader Import Sage Attention Error Comprehensive Check
This section provides a comprehensive analysis of import Sage Attention errors encountered by users while trying to use WanVideo ModelLoader, particularly the Windows system in the ComfyUI embedded Python 3.13.1 environment as of March 3, 2025. The analysis covers potential causes, compatibility issues and step-by-step solutions, reference files and community insights.
Background and error
Error message "Can not import Sage Attention: No module named `triton '" indicates Python environment missing triton module, this is the Sage Action dependency entry. WanVideoModelLoader is a CofyUI-WanVideoWrapper self-defined node that may use Sage Attention to calculate high-impact attention in the video generation model, whose import failure indicates that installation is missing or incompatible.
Analysis of potential causes
- Missing Triton module
Error 'no module named `triton 'tritonPackage not installed. Sage Attention Document Requirementstriton >= 3.0.0Operation. Given that the user Python version is 3.13.1, the initial attempt to install Python 3.12 failed, probably because the correct wheel suitable for 3.13 was not used. - Platform and version compatibility
Official PyPI pageTriton PyPIShows the main supply of Linux wheels instead of Windows, which complicates the installation of Windows systems. Community efforts, such as Web0rdho/triton-windows repository, provides Windows pre-build wheels to support Python 3.9 to 3.13, which is relevant to user settings. - ComfyUI embedded environment
ComfyUI is a node-based Stable Diffusion GUI that contains embedded Python installations and usesD:\aitools\ComfyUI_windows.python_embeded\ScriptsEnvironment under directory. In view of the mistake,tritonThis may be missing, possibly as a result of the incompatibility of the wheel files or inappropriate installation methods.
Gradual breakdown
To address this problem, please follow the following steps:
- Determine Python version and platform
User has confirmed Python as 3.13.1 platform Windows, possibly 64 bits, as requiredwin_am64Label the wheel. - Install from pre-build wheel Triton
Since there's no official Windows wheel on PyPI, This post is part of our special coverage Global Voices 2011. Downloadtriton-3.2.0-cp313-cp313-win_am64.whlI don't know. Put it in the ComfyUI Scripts directory, run:pip install triton-3.2.0-cp313-cp313-win_am64.whlEnsures that CUDA is installed (for example, for Blackwell GPU, CUDA 12.8 or more, e. g. Sage Attention requirements) and adds its bin path to the PATH environment variable. - Install Sage Attention
Installtritonthen install with the following commandsageattention:pip install sageattentionPyPI pagePageattention) confirm version 1.0.6 available and listtritonTo rely on the item, the pip should be able to handle it. - Follow ComfyUI-WanVideo Wrapper installation
Will ComfyUI-WanVideoWrapper repository Cloning tocustom_nodes, installation dependent:pip install -r requirements.txtor portable installation:python_embeded/python.exe -m pip install -r ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/requirements.txtEnsure that WanVideoModelLoader and its dependencies, including Sage Attention, are set correctly. - Validation installation
Test run simple Python script:import sageattentionIf there is no error, set right. For WanVideoModelLoader, ensure that the model is placed in the correct directory (e.g. text encoder in
print("Sage Attention 导入成功")ComfyUI/models/text_encodersI don't know.
Detailed insights and community context
- Page Attention Dependence: Based on Tu-ml/SageAttention GitHub repository,SageAttention
python>=3.9I don't know.torch>=2.3.0I don't know.triton>=3.0.0, and a specific CUDA version. User Python 3.13.1 compatible, but CUDA settings are critical. - WanVideoModelLoader ContextOther Organiser CofyUI-WanVideoWrapper A similar error is shown in questions such as " No module named `sageattention ' " or " No module named `triton ' " , indicating that installation challenges are common. Community posts, such as Civitai articlesInstall 8-bit Attention Guide | Civitai) It is recommended that both be installed through pip, in line with our steps.
- Unexpected Details: You may not think that WanVideoModel Loader is a video-generated node that relies on high-level attention mechanisms such as Sage Attention, which requires specific GPU and CUDA configurations to optimize performance, which may affect users without high-end hardware.
Table: Comparison of Python version with wheel compatibility
| Python Version | Example of wheel label | Compatibility with user settings | Remarks |
|---|---|---|---|
| 3.13 | cp313-cp313m-win_am64 | Yes. | Match user Python 3.13.1 |
| 3.12 | cp312-cp312m-win_am64 | Yes | The wheel of the initial attempt, no match. |
| 3.11 | cp311-cp311m-win_am64 | Yes | Probably older embedded version |
Conclusions
The most likely cause of the error is lack triton The module is caused by the Sage Attention dependency item on which WanVideoModelLoader relies. By From This post is part of our special coverage Global Voices 2011. Download correct for Python 3.13 triton Wheels, install it, then install it. sageattentionIt should solve the problem.