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

No module named 'mamba_attn_diff.models.s6m_module' #2

Open
moeinheidari7829 opened this issue May 28, 2024 · 3 comments
Open

No module named 'mamba_attn_diff.models.s6m_module' #2

moeinheidari7829 opened this issue May 28, 2024 · 3 comments

Comments

@moeinheidari7829
Copy link

Dear authors, thank you for the good work and open-sourcing the code, can you please provide the S6MModule in the code, once running the training script, I am facing an error as follows:

/home/moein/Desktop/Diffusion-mamba/DiM-DiffusionMamba/mamba_attn_diff/models/adapter_attn4mamba │
│ .py:14 in │
│ │
│ 11 from einops import rearrange, repeat │
│ 12 │
│ 13 from diffusers.models.embeddings import SinusoidalPositionalEmbedding, get_2d_sincos_pos │
│ ❱ 14 from .s6m_module import S6MModule │
│ 15 │
│ 16 try: │
│ 17 │ from causal_conv1d import causal_conv1d_fn, causal_conv1d_update │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'mamba_attn_diff.models.s6m_module'

@tyshiwo1
Copy link
Owner

Oops! It is a deprecated class. We now delete it.

@moeinheidari7829
Copy link
Author

Thank you for the prompt response; that error disappeared. However, another module is missing as follows, could you please upload the last error-free code you ran without the deprecated modules?

28 │
│ 29 from copy import deepcopy │
│ 30 │
│ ❱ 31 from mamba_ssm import Mamba │
│ 32 from mamba_attn_diff.models.adapter_attn4mamba import token_dropout │
│ 33 │
│ 34 from .normalization import * │
│ │
init.py:3 in │
│ │
│ 1 version = "1.2.0.post1" │
│ 2 │
│ ❱ 3 from mamba_ssm.ops.selective_scan_interface import selective_scan_fn, ma │
│ 4 from mamba_ssm.modules.mamba_simple import Mamba │
│ 5 from mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel │
│ 6 │
│ │
│ ops/selective_scan_interface.py:16 in │
│ │
│ 13 │ causal_conv1d_fn = None │
│ 14 │ causal_conv1d_cuda = None │
│ 15 │
│ ❱ 16 import selective_scan_cuda │
│ 17 │
│ 18 │
│ 19 class SelectiveScanFn(torch.autograd.Function): │
╰──────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'selective_scan_cuda'

@tyshiwo1
Copy link
Owner

tyshiwo1 commented May 30, 2024

To solve this issue, You need to successfully install and compile Mamba:

pip install causal-conv1d==1.2.0.post2 # The version maybe different depending on your cuda version
CAUSAL_CONV1D_FORCE_BUILD=TRUE pip install --user -e .

In our README, we have updated our Installation section and we also prepared a subsection named Frequently Asked Questions. You can also refer to that new Installation section for answers.

Note: Please download the new README file into your project directory for correct compilation.

We have tested our released code on our server from scratch today, and it works well for now. If you still encounter issues, feel free to ask us 😊.

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

2 participants