Error

Collecting flash-attn>=2.5.0 (from stable-audio-tools)

Using cached flash_attn-2.6.3.tar.gz (2.6 MB)

Preparing metadata (setup.py) ... error

error: subprocess-exited-with-error


× python setup.py egg_info did not run successfully.

│ exit code: 1

╰─> [22 lines of output]

fatal: not a git repository (or any of the parent directories): .git

C:\Users\mackwin\AppData\Local\Temp\pip-install-fvk7whpe\flash-attn_1bcbf1aed59b436ea87b613be10615e1\setup.py:95: UserWarning: flash_attn was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.

...

Solution

The error message you're encountering is related to the installation of a Python package named flash-attn, which is a dependency of stable-audio-tools. Here's a breakdown of the issues and potential solutions:

  1. Subprocess-Exited-With-Error: This indicates that a subprocess that pip initiated to build the package exited with an error. The specific error code is 1, which is a general error code indicating something went wrong.
  2. Not a Git Repository: The error message fatal: not a git repository (or any of the parent directories): .git suggests that the installation script is trying to access a .git directory, which is typically used for version control in Git, but it's not available in the current context. This might be because the package is being installed from a cached source and doesn't contain the source repository.
  3. NVCC Not Found: The UserWarning about nvcc indicates that the NVIDIA CUDA compiler (nvcc) is not found on your system. flash-attn might require CUDA for some of its functionalities, and without nvcc, it can't compile certain components.