Skip to content

how to install SageAttention And Torch? #1416

Closed as not planned
Closed as not planned

Description

@MrMyth

Package

how to install SageAttention And Torch?

When did the issue occur?

Installing the Package

What GPU / hardware type are you using?

Nvidia 4070 Ti with Cuda

What happened?

how to install SageAttention And Torch?

Console output

No response

Version

v2.15.1

What Operating System are you using?

Windows

Activity

  1. precursor1188 commented on Oct 31, 2025

    @precursor1188

    I get this error message for SageAttention. Triton seems OK

    Installing SageAttention
    Using Python 3.12.10 environment at: venv
    error: The build backend returned an error
    Caused by: Call to setuptools.build_meta.build_wheel failed (exit code: 1)

    [stderr]
    Traceback (most recent call last):
    File "", line 8, in
    File "C:\StabilityMatrix\Data\Assets\uv\cache\builds-v0.tmpGWA3c7\Lib\site-packages\setuptools_init_.py", line 24, in
    from . import logging, monkey
    File "C:\StabilityMatrix\Data\Assets\uv\cache\builds-v0.tmpGWA3c7\Lib\site-packages\setuptools\logging.py", line 5, in
    from . import monkey
    File "C:\StabilityMatrix\Data\Assets\uv\cache\builds-v0.tmpGWA3c7\Lib\site-packages\setuptools\monkey.py", line 13, in
    import distutils.filelist
    ModuleNotFoundError: No module named 'distutils'

    hint: distutils was removed from the standard library in Python 3.12. Consider adding a constraint to avoid building a package that depends on distutils.
    Error: StabilityMatrix.Core.Exceptions.ProcessException: pip install failed with code 2: 'Using Python 3.12.10 environment at: venv\nerror: The build backend returned an error\n Caused by: Call to setuptools.build_meta.build_wheel failed (exit code: 1)\n\n[stderr]\nTraceback (most recent call last):\n File "", line 8, in \n File "C:\StabilityMatrix\Data\Assets\uv\cache\builds-v0.tmpGWA3c7\Lib\site-packages\setuptools_init_.py", line 24, in \n from . import logging, monkey\n File "C:\StabilityMatrix\Data\Assets\uv\cache\builds-v0.tmpGWA3c7\Lib\site-packages\setuptools\logging.py", line 5, in \n from . import monkey\n File "C:\StabilityMatrix\Data\Assets\uv\cache\builds-v0.tmpGWA3c7\Lib\site-packages\setuptools\monkey.py", line 13, in \n import distutils.filelist\nModuleNotFoundError: No module named 'distutils'\n\nhint: distutils was removed from the standard library in Python 3.12. Consider adding a constraint to avoid building a package that depends on distutils.\n'
    at StabilityMatrix.Core.Python.UvVenvRunner.PipInstall(ProcessArgs args, Action1 outputDataReceived) at StabilityMatrix.Core.Models.PackageModification.InstallSageAttentionStep.ExecuteAsync(IProgress1 progress)
    at StabilityMatrix.Core.Models.PackageModification.InstallSageAttentionStep.ExecuteAsync(IProgress1 progress) at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IEnumerable1 steps)

  2. nyukers commented on Nov 15, 2025

    @nyukers

    Installing Triton
    Using Python 3.10.11 environment at: venv
    Audited 1 package in 6ms
    Downloading Python libraries
    Installing SageAttention
    Using Python 3.10.11 environment at: venv
    error: The build backend returned an error
    Caused by: Call to setuptools.build_meta.build_wheel failed (exit code: 1)

    [stderr]
    Traceback (most recent call last):
    File "", line 14, in
    File "D:\Matrix\Data\Assets\uv\cache\builds-v0.tmptWhiVB\lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
    File "D:\Matrix\Data\Assets\uv\cache\builds-v0.tmptWhiVB\lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
    self.run_setup()
    File "D:\Matrix\Data\Assets\uv\cache\builds-v0.tmptWhiVB\lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
    exec(code, locals())
    File "", line 36, in
    ModuleNotFoundError: No module named 'torch'

    hint: This error likely indicates that file:///D:/Matrix/Data/Packages/ComfyUI/SageAttention depends on torch, but doesn't declare it as a build dependency. If file:///D:/Matrix/Data/Packages/ComfyUI/SageAttention is a first-party package, consider adding torch to its build-system.requires. Otherwise, uv pip install torch into the environment and re-run with --no-build-isolation.
    Error: StabilityMatrix.Core.Exceptions.ProcessException: pip install failed with code 2: 'Using Python 3.10.11 environment at: venv\nerror: The build backend returned an error\n Caused by: Call to setuptools.build_meta.build_wheel failed (exit code: 1)\n\n[stderr]\nTraceback (most recent call last):\n File "", line 14, in \n File "D:\Matrix\Data\Assets\uv\cache\builds-v0.tmptWhiVB\lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel\n return self._get_build_requires(config_settings, requirements=[])\n File "D:\Matrix\Data\Assets\uv\cache\builds-v0.tmptWhiVB\lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires\n self.run_setup()\n File "D:\Matrix\Data\Assets\uv\cache\builds-v0.tmptWhiVB\lib\site-packages\setuptools\build_meta.py", line 318, in run_setup\n exec(code, locals())\n File "", line 36, in \nModuleNotFoundError: No module named 'torch'\n\nhint: This error likely indicates that file:///D:/Matrix/Data/Packages/ComfyUI/SageAttention depends on torch, but doesn't declare it as a build dependency. If file:///D:/Matrix/Data/Packages/ComfyUI/SageAttention is a first-party package, consider adding torch to its build-system.requires. Otherwise, uv pip install torch into the environment and re-run with --no-build-isolation.\n'
    at StabilityMatrix.Core.Python.UvVenvRunner.PipInstall(ProcessArgs args, Action1 outputDataReceived) at StabilityMatrix.Core.Models.PackageModification.InstallSageAttentionStep.ExecuteAsync(IProgress1 progress)
    at StabilityMatrix.Core.Models.PackageModification.InstallSageAttentionStep.ExecuteAsync(IProgress1 progress) at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IEnumerable1 steps)

    My env: 22H2, 4060Ti, CUDA 12.9, Matrix 2.15.4

  3. nyukers commented on Nov 15, 2025

    @nyukers

    How can I upgrade version of Python, CUDA and Torch in Stability Matrix?

  4. github-actions commented on Jan 15, 2026

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove the stale label or comment, else this will be closed in 7 days.

  5. added
    staleStale issue or inactive for long period of time
    on Jan 15, 2026
  6. github-actions commented on Jan 22, 2026

    @github-actions

    This issue was closed because it has been stale for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleStale issue or inactive for long period of time

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions