-
Notifications
You must be signed in to change notification settings - Fork 533
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
Comments
If using linux: pip install triton |
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. |
I have the same as OP. I have Triton installed and Sageattention. I used Triton 3.1.0-cp312 as I'm using Python 3.12. I can go into Python and do an 'import sageattention' or 'import triton' and see no errors. I'll go back and see if HunyuanVideo is looking for a particular Triton I guess. |
I ended up following the instructions very carefully here on the triton-windows page (I didn't realize triton is really meant for Linux and the Windows version is kinda a hack). I'm using an installed Cuda so there are specific instructions for that also. Just read carefully and it will work. https://github.com/woct0rdho/triton-windows?tab=readme-ov-file |
I keep receiving this error when I try to generate an image. How can I fix this?
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'
The text was updated successfully, but these errors were encountered: