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

gradio demo not working #28

Closed
21pl opened this issue Dec 3, 2024 · 5 comments
Closed

gradio demo not working #28

21pl opened this issue Dec 3, 2024 · 5 comments

Comments

@21pl
Copy link

21pl commented Dec 3, 2024

new install but get the following in the shell after a few seconds having pressed process

File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ML_G\MoGe\utils3d\numpy\utils.py", line 105, in
@no_runtime_warnings
NameError: name 'no_runtime_warnings' is not defined. Did you mean: 'RuntimeWarning'?

@21pl
Copy link
Author

21pl commented Dec 3, 2024

actually running infer.py gives the same error

@DiamondGlassDrill
Copy link

DiamondGlassDrill commented Dec 3, 2024

I explained here a quick fix until update.
(#19 (comment))

@EasternJournalist I added to \MoGe\utils3d\utils.py at the top of the code

def no_runtime_warnings(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", category=RuntimeWarning)
            return func(*args, **kwargs)
    return wrapper

As otherwise the decorator didn't work in \MoGe\utils3d\utils.py

@EasternJournalist
Copy link
Collaborator

Sorry for the bug. The missing decorator is now added as decorator generator and renamed as "no_warnings".

@21pl
Copy link
Author

21pl commented Dec 4, 2024

great! thanks

inference is working for --maps but not for creating geo with the --ply option
same issue for inference, gradio and panaroma

AttributeError: module 'numpy' has no attribute 'acos'. Did you mean: 'cos'?

@EasternJournalist
Copy link
Collaborator

EasternJournalist commented Dec 5, 2024

great! thanks

inference is working for --maps but not for creating geo with the --ply option same issue for inference, gradio and panaroma

AttributeError: module 'numpy' has no attribute 'acos'. Did you mean: 'cos'?

acos is a short alias for arccos. It might not be supported in some old numpy versions. I have replaced acos with arccos for compatibility in the latest commitment.

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

3 participants