eladrich / latent-nerf

Official Implementation for "Latent-NeRF for Shape-Guided Generation of 3D Shapes and Textures"
MIT License
694 stars 49 forks source link

ModuleNotFoundError: No module named '_gridencoder' ninja build stopped #7

Open CWGH221 opened 1 year ago

CWGH221 commented 1 year ago

When running the unconstrained Latent-NeRF for text-to-3D, demo command (below), I get a runtime error during the tilegrid encoding

run command: python3 -m scripts.train_latent_nerf --config_path demo_configs/latent_nerf/sand_castle.yaml

Error:

import _gridencoder as _backend
ModuleNotFoundError: No module named '_gridencoder'
During handling of the above exception, another exception occurred:

21 errors detected in the compilation of "/tmp/tmpxft_000039fb_00000000-6_gridencoder.cpp1.ii".
ninja: build stopped: subcommand failed.
Texaser commented 1 year ago

When running the unconstrained Latent-NeRF for text-to-3D, demo command (below), I get a runtime error during the tilegrid encoding

run command: python3 -m scripts.train_latent_nerf --config_path demo_configs/latent_nerf/sand_castle.yaml

Error:

import _gridencoder as _backend
ModuleNotFoundError: No module named '_gridencoder'
During handling of the above exception, another exception occurred:

21 errors detected in the compilation of "/tmp/tmpxft_000039fb_00000000-6_gridencoder.cpp1.ii".
ninja: build stopped: subcommand failed.

Did you find the method to solve this? I'm facing the same problem right now. Thanks for your reply!

Aidanjosiah02 commented 1 year ago

I found something that got me past the same error with "stable-dreamfusion". Not sure if there are any negative consequences though. Anyway go into whatever file caused that error, go to whatever line it says and remove the underscore on the name of the import. This is supposed to reference a C header file, but the name doesn't match unless you remove the underscore. I'm not sure if this is a Linux thing for referencing C files; I have never used any Linux distributions for this type of thing. You may also need to do this for "raymarching" and "freqencoder" if you have those in this project.