← Back to list

WanVideoModelLoader hinted wrong about Can't report PageAttention: No mobile nam

itadol5j

WanVideoModelLoader Can't Import PageAttention: No module named `triton ' .

Key points

  • Research shows the correct installation. triton After Version (Windows Wheel for Python 3.13.1), install sageattention Should solve the problem that WanVideoModelLoader cannot import Sage Attention.
  • Evidence tends to ensure that the ComfyUI embedded Python environment is installed triton and sageattentionBecause 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 Scripts Contents (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.whl
    My 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 triton Require GPU acceleration.
Install Sage Attention
  • Install triton After running the following commands to install sageattention:pip install sageattention
Configure ComfyUI-WanVideo Wrapper
  • Will ComfyUI-WanVideoWrapper repository Cloning to ComfyUI custom_nodes folder.
  • Install its dependencies, run:pip install -r requirements.txt
    or 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

  1. Missing Triton module
    Error 'no module named `triton ' triton Package not installed. Sage Attention Document Requirements triton >= 3.0.0 Operation. 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.
  2. 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.
  3. ComfyUI embedded environment
    ComfyUI is a node-based Stable Diffusion GUI that contains embedded Python installations and uses D:\aitools\ComfyUI_windows.python_embeded\Scripts Environment under directory. In view of the mistake,triton This 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:

  1. Determine Python version and platform
    User has confirmed Python as 3.13.1 platform Windows, possibly 64 bits, as required win_am64 Label the wheel.
  2. 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. Download triton-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.whl
    Ensures 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.
  3. Install Sage Attention
    Install triton then install with the following command sageattention: pip install sageattention
    PyPI pagePageattention) confirm version 1.0.6 available and list triton To rely on the item, the pip should be able to handle it.
  4. Follow ComfyUI-WanVideo Wrapper installation
    Will ComfyUI-WanVideoWrapper repository Cloning to custom_nodes, installation dependent: pip install -r requirements.txt
    or portable installation: python_embeded/python.exe -m pip install -r ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/requirements.txt
    Ensure that WanVideoModelLoader and its dependencies, including Sage Attention, are set correctly.
  5. Validation installation
    Test run simple Python script: import sageattention
    print("Sage Attention 导入成功")
    If there is no error, set right. For WanVideoModelLoader, ensure that the model is placed in the correct directory (e.g. text encoder in 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 VersionExample of wheel labelCompatibility with user settingsRemarks
3.13cp313-cp313m-win_am64Yes.Match user Python 3.13.1
3.12cp312-cp312m-win_am64YesThe wheel of the initial attempt, no match.
3.11cp311-cp311m-win_am64YesProbably 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.