pytorch-labs / segment-anything-fast

A batched offline inference oriented version of segment-anything
Apache License 2.0
1.21k stars 72 forks source link

No module named triton on 2080TI #120

Open JamesHOEEEE opened 6 months ago

JamesHOEEEE commented 6 months ago

Hi all

I was try to run amg_example.py on 2080TI too , I know the triton kernel was written specifically for the A100 ,

so according the ReadMe file its need to set the environment variable to SEGMENT_ANYTHING_FAST_USE_FLASH_4=0,

here is my code

import OS os.environ[' SEGMENT_ANYTHING_FAST_USE_FLASH_4'] = '0'

but its still have miss the triton module error ,

Did I do something wrong? Or have any suggestions?

thanks you

cpuhrsch commented 6 months ago

Hi @JamesHOEEEE,

You can try manually disabling the kernel by commenting out these lines here:

https://github.com/pytorch-labs/segment-anything-fast/blob/bd3767236ca2b3aaebf8536b5453f8c5aef7d492/segment_anything_fast/flash_4.py#L342-L367

Thanks, Christian

JamesHOEEEE commented 6 months ago

Hi @cpuhrsch

Thanks for your reply , It seems working fine now

FlyingAnt2018 commented 4 months ago

Hi @JamesHOEEEE,

You can try manually disabling the kernel by commenting out these lines here:

https://github.com/pytorch-labs/segment-anything-fast/blob/bd3767236ca2b3aaebf8536b5453f8c5aef7d492/segment_anything_fast/flash_4.py#L342-L367

Thanks, Christian

Hi, bro. I am working on windows11 os, and have no effect by commenting these lines. Report "No module named triton", and how to deal with code in flash_4.py about "import triton" ?