hustvl / Vim

[ICML 2024] Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model
Apache License 2.0
2.56k stars 160 forks source link

causal_conv1d_fwd(): incompatible function arguments #41

Open a912289748 opened 3 months ago

FilippoBotti commented 3 months ago

Same issue, do you find out how to solve it?

`TypeError: causal_conv1d_fwd(): incompatible function arguments. The following argument types are supported:

  1. (arg0: torch.Tensor, arg1: torch.Tensor, arg2: Optional[torch.Tensor], arg3: Optional[torch.Tensor], arg4: Optional[torch.Tensor], arg5: Optional[torch.Tensor], arg6: bool) -> torch.Tensor`
Dexterp37 commented 3 months ago

@FilippoBotti that's likely because it's using the wrong causal-conv1d version. Instead of using the vendored version, pinning it to version 1.1.0 makes it work (I wrote a short tutorial about how to use Vision Mamba for image classification )

FilippoBotti commented 3 months ago

@FilippoBotti that's likely because it's using the wrong causal-conv1d version. Instead of using the vendored version, pinning it to version 1.1.0 makes it work (I wrote a short tutorial about how to use Vision Mamba for image classification )

It works, thanks!

Jamesgender commented 3 months ago

It works, thanks!

bingo-G commented 2 months ago

@FilippoBotti that's likely because it's using the wrong causal-conv1d version. Instead of using the vendored version, pinning it to version 1.1.0 makes it work (I wrote a short tutorial about how to use Vision Mamba for image classification )

It works, thanks!

uxhao-o commented 2 months ago

I have been successfully run. Environment follows: cuda 11.8 python 3.10.13 pytorch 2.1.1 causal_conv1d 1.1.1 mamba-ssm 1.2.0.post1

pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
pip install causal_conv1d==1.1.1
pip install mamba-ssm==1.2.0.post1
# copy mamba-ssm dir in vim to conda env site-package dir
cp -rf mamba-1p1p1/mamba_ssm /opt/miniconda3/envs/mamba/lib/python3.10/site-packages
dandeperson commented 2 months ago

我已经成功运行了。环境如下: cuda 11.8 python 3.10.13 pytorch 2.1.1 causal_conv1d 1.1.1 mamba-ssm 1.2.0.post1

pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
pip install causal_conv1d==1.1.1
pip install mamba-ssm==1.2.0.post1
# copy mamba-ssm dir in vim to conda env site-package dir
cp -rf mamba-1p1p1/mamba_ssm /opt/miniconda3/envs/mamba/lib/python3.10/site-packages

我也是相同的配置,但是我仍然报错`TypeError: causal_conv1d_fwd(): incompatible function arguments. The following argument types are supported:

  1. (arg0: torch.Tensor, arg1: torch.Tensor, arg2: Optional[torch.Tensor], arg3: Optional[torch.Tensor], arg4: bool) -> torch.Tensor`
ph-marra commented 1 month ago

Hi, I stumbled in the same error today and pinning causal-conv1d to 1.1.0 did not work while trying to run MambaLMHeadModel found in mamba_ssm/models/mixer_seq_simple.py.

I made it work instead by locally installing causal-conv1d in version v1.2.0.post2 :

git clone https://github.com/Dao-AILab/causal-conv1d
cd causal-conv1d
git checkout v1.2.0.post2
pip install .

The problem stems from the addition of two new parameters here.

mazzzystar commented 1 month ago

same issue here, solved by

pip install -U causal_conv1d

I got version of

Successfully installed causal_conv1d-1.2.0.post2
LFY2002 commented 1 month ago

same issue here, solved by

pip install -U causal_conv1d

I got version of

Successfully installed causal_conv1d-1.2.0.post2

ubuntu 22.04 有效

Yiwen233 commented 4 weeks ago

same issue here, solved by

pip install -U causal_conv1d

I got version of

Successfully installed causal_conv1d-1.2.0.post2

It works for me, thanks a lot

poult-lab commented 2 weeks ago

vendored version

it works, thank you