Import error 'pip install flash_attn'
Hi beginner here, when I try to run my python code, I received this error
ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run 'pip install flash_attn'
what thing that I miss? below is ther requirement.txt that I install
Pillow==10.1.0
torch==2.3.1
torchaudio==2.3.1
torchvision==0.18.1
transformers==4.44.2
librosa==0.9.0
soundfile==0.12.1
vector-quantize-pytorch==1.18.5
vocos==0.1.0
decord
moviepy
I am using python: 3.12.3
Just run in your env pip install flash-attn --no-build-isolation
Reference: https://github.com/Dao-AILab/flash-attention?tab=readme-ov-file#installation-and-features
I have done that and got also got error
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ...
UPDATED
On 'Regedit' I enable the long path support manually via Windows Registry.
New error occur:
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.
if I try nvcc --version or nvidia-smi, it already there.
Quick question, is it possible to run this model on windows 11?
Hi! If you are unable to install the flash_attn
module using pip on Windows, you can download a precompiled binary WHL file for installation.
Reference: https://github.com/bdashore3/flash-attention/releases
Tq for the reply, really appreciate it. still I am unable to run this model. maybe due to my hardware T.T
Could you please provide more details regarding the error message?