Skip to content

trouble running newbie-image-exp0.1 and/or installing flash-attention #1491

@manassm

Description

@manassm

I've been trying to install flash attention in my comfy-desktop (.exe) environment to run newbie-image-exp0.1 but kept failing.
Below is an AI-summary of my current situation:

[Bug] ImportError: DLL load failed for flash_attn_2_cuda breaking core nodes (ComfyUI Desktop App)
System Information

ComfyUI Version: 0.4.0 (Desktop App)

OS: Windows 11

GPU: NVIDIA GeForce RTX 4080 (16GB VRAM)

Python Version: 3.12.10

PyTorch Version: 2.8.0+cu129

Python Executable: C:\Users\SEPHiA\Documents\ComfyUI\.venv\Scripts\python.exe

Describe the bug

After attempting to set up requirements for a new model, I am encountering import failures for core ComfyUI nodes (nodes_canny.py and nodes_morphology.py). The root cause appears to be an ImportError in the flash_attn dependency which is triggered when kornia is imported by these nodes.
Error Log
Plaintext

Traceback (most recent call last):
...
File "C:\Users\SEPHiA\Documents\ComfyUI.venv\Lib\site-packages\kornia\feature\lightglue.py", line 48, in
from flash_attn.modules.mha import FlashCrossAttention
File "C:\Users\SEPHiA\Documents\ComfyUI.venv\Lib\site-packages\flash_attn_init_.py", line 3, in
from flash_attn.flash_attn_interface import (
File "C:\Users\SEPHiA\Documents\ComfyUI.venv\Lib\site-packages\flash_attn\flash_attn_interface.py", line 15, in
import flash_attn_2_cuda as flash_attn_gpu
ImportError: DLL load failed while importing flash_attn_2_cuda: 지정된 프로시저를 찾을 수 없습니다. (The specified procedure could not be found.)

IMPORT FAILED: nodes_canny.py
IMPORT FAILED: nodes_morphology.py

Additional Context

I am using the ComfyUI Desktop App, not the Portable version.

The environment is the internal .venv created by the Desktop installer.

My system has CUDA 12.1 installed globally, but the ComfyUI Desktop log shows 2.8.0+cu129.

It seems kornia has a hard dependency chain leading to flash_attn, and because the flash_attn binary is incompatible with the current Desktop App environment, it prevents the standard comfy_extras nodes from loading.

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions