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

An error with the __init__() of gamba model #6

Open
zjxx opened this issue Sep 10, 2024 · 5 comments
Open

An error with the __init__() of gamba model #6

zjxx opened this issue Sep 10, 2024 · 5 comments

Comments

@zjxx
Copy link

zjxx commented Sep 10, 2024

Thank you for your great work.
As I was running the test.sh,I seemed to encounter a problem with the gamba_model.py

Traceback (most recent call last): File "gamba_infer.py", line 22, in <module> from core.gamba_models import Gamba File "/root/autodl-tmp/Gamba/core/gamba_models.py", line 349, in <module> class Gamba(torch.nn.Module): File "/root/autodl-tmp/Gamba/core/gamba_models.py", line 442, in Gamba def forward_gaussians(self, data): TypeError: __init__() takes 1 positional argument but 2 were given

@luminous-Nc
Copy link

I have a similar issue when I was running test.sh: python gamba_infer.py --model-type gamba --resume ./checkpoint/gamba_ep399.pth --workspace workspace_test --test_path ./data_test

 File "D:\Gamba\gamba_infer.py", line 20, in <module>
    from core.options import AllConfigs, Options
 File "D:\Gamba\core\options.py", line 110, in <module>
    AllConfigs = tyro.extras.subcommand_type_from_defaults(config_defaults, config_doc)
File "D:\Gamba\venv\lib\site-packages\tyro\extras\_base_configs.py", line 132, in subcommand_type_from_defaults
    assert len(defaults) >= 2, "At least two subcommands are required."
AssertionError: At least two subcommands are required.

@florinshen
Copy link
Collaborator

seems bugs raised from tyro version, can you pls show me your tyro version info by running this command
pip show tyro
and here is my tyro info,

Name: tyro
Version: 0.8.5
Summary: Strongly typed, zero-effort CLI interfaces
Home-page: 
Author: 
Author-email: brentyi <[email protected]>
License: MIT
Location: /opt/conda/lib/python3.10/site-packages
Requires: docstring-parser, rich, shtab, typing-extensions
Required-by: #N/A

@zjxx
Copy link
Author

zjxx commented Sep 14, 2024

seems bugs raised from tyro version, can you pls show me your tyro version info by running this command pip show tyro and here is my tyro info,

Name: tyro
Version: 0.8.5
Summary: Strongly typed, zero-effort CLI interfaces
Home-page: 
Author: 
Author-email: brentyi <[email protected]>
License: MIT
Location: /opt/conda/lib/python3.10/site-packages
Requires: docstring-parser, rich, shtab, typing-extensions
Required-by: #N/A

As I change the tyro version from 0.8.10 to .8.5,the problem remains. I follow the solution from DJNing and get the error Traceback (most recent call last): File "gamba_infer.py", line 22, in <module> from core.gamba_models import Gamba File "/root/autodl-tmp/Gamba/core/gamba_models.py", line 349, in <module> class Gamba(torch.nn.Module): File "/root/autodl-tmp/Gamba/core/gamba_models.py", line 442, in Gamba def forward_gaussians(self, data): TypeError: __init__() takes 1 positional argument but 2 were given
Otherwise I get the error same as luminous-Nc

@luminous-Nc
Copy link

luminous-Nc commented Sep 14, 2024

Here is my tyro info

(venv) PS D:\Gamba> pip show tyro
Name: tyro
Version: 0.8.10                                                                         
Summary: Strongly typed, zero-effort CLI interfaces                                     
Home-page:                                                                              
Author:                                                                                 
Author-email: brentyi <[email protected]>                                            
License: MIT                                                                            
Location: d:\gamba\venv\lib\site-packages                                  
Requires: colorama, docstring-parser, eval-type-backport, rich, shtab, typing-extensions
Required-by: 

@HIT-CS-Kn1ght
Copy link

Thank you for your great work. As I was running the test.sh,I seemed to encounter a problem with the gamba_model.py

Traceback (most recent call last): File "gamba_infer.py", line 22, in <module> from core.gamba_models import Gamba File "/root/autodl-tmp/Gamba/core/gamba_models.py", line 349, in <module> class Gamba(torch.nn.Module): File "/root/autodl-tmp/Gamba/core/gamba_models.py", line 442, in Gamba def forward_gaussians(self, data): TypeError: __init__() takes 1 positional argument but 2 were given

change the line 441 in Gamba/core/gamba_models.py to @torch.no_grad()

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

4 participants