Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import SageAttention: No module named 'triton' is:issue #110

Open
Xxredz opened this issue Dec 11, 2024 · 2 comments
Open

Can't import SageAttention: No module named 'triton' is:issue #110

Xxredz opened this issue Dec 11, 2024 · 2 comments

Comments

@Xxredz
Copy link

Xxredz commented Dec 11, 2024

I keep receiving this error when I try to generate an image. How can I fix this?

Error

If anyone could provide easy to understand steps, I would really appreciate it.

Just so you know, I click python.exe in my ComfyUI_windows_portable > python_embeded folder and it detects Python 3.12.7

Error:

FETCH DATA from: C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager-main\extension-node-map.json [DONE]
got prompt
Loading text encoder model (clipL) from: C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\models\clip\clip-vit-large-patch14
Text encoder to dtype: torch.float16
Loading tokenizer (clipL) from: C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\models\clip\clip-vit-large-patch14
Loading text encoder model (llm) from: C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\models\LLM\llava-llama-3-8b-text-encoder-tokenizer
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 4/4 [00:10<00:00, 2.64s/it]
Text encoder to dtype: torch.float16
Loading tokenizer (llm) from: C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\models\LLM\llava-llama-3-8b-text-encoder-tokenizer
llm prompt attention_mask shape: torch.Size([1, 161]), masked tokens: 24
clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 25
!!! Exception during processing !!! Can't import SageAttention: No module named 'triton'
Traceback (most recent call last):
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-HunyuanVideoWrapper\nodes.py", line 150, in loadmodel
from sageattention import sageattn_varlen
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\sageattention_init_.py", line 1, in
from .core import sageattn, sageattn_varlen
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\sageattention\core.py", line 2, in
import triton
ModuleNotFoundError: No module named 'triton'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Nebula PC\Desktop\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-HunyuanVideoWrapper\nodes.py", line 152, in loadmodel
raise ValueError(f"Can't import SageAttention: {str(e)}")
ValueError: Can't import SageAttention: No module named 'triton'

@tavyscrolls
Copy link

If using linux: pip install triton
Since you're on windows, you'll have to find a fork that supports windows

@scottmudge
Copy link

scottmudge commented Dec 11, 2024

People just need to sticky this:

https://github.com/woct0rdho/triton-windows/releases

Also, this question belongs on the ComfyUI-HunyuanVideoWrapper project issue tracker, not this one. I don't think this official repo even uses SageAttention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants