stable-dreamfusion
stable-dreamfusion copied to clipboard
Launching main.py with --dmtet flag fails with an error
Description
I tried to fine-tune the dreamfusion mesh with the dmtet but the script fails miserably with an error
[F glutil.cpp:338] eglInitialize() failed Aborted (core dumped)
Steps to Reproduce
- Build docker from dockerfile
- Train dreamfusion
python3 main.py --text "fantasy character dwarf, full height, realistic, high quality" --workspace trial -O --vram_O
- Run dmtet fine-tuning
python3 main.py -O --text "fantasy character dwarf, full height, realistic, high quality" --workspace trial_dmtet --dmtet --iters 5000 --init_ckpt trial/checkpoints/df.pth
- Get an error
Expected Behavior
Finetuned with dmtet mesh
Environment
Ubuntu 20.04.5 LTS, PyTorch 1.12, CUDA 11.6
@SavvaI Hi, please check https://github.com/ashawkey/stable-dreamfusion#trouble-shooting.
@SavvaI Hi, please check https://github.com/ashawkey/stable-dreamfusion#trouble-shooting.
I am using Nvidia-docker as specified above, so I tried to act as suggested in https://github.com/ashawkey/stable-dreamfusion/issues/131#issuecomment-1414727699 but it did not work
Solution
Go to ./nerf/renderer.py
Replace dr.RasterizeGLContext
to dr.RasterizeCudaContext
It work well!!
So does the same problem in GET3D and nvdiffrec.
Solution
Go to ./nerf/renderer.py Replace
dr.RasterizeGLContext
todr.RasterizeCudaContext
It work well!! So does the same problem in GET3D and nvdiffrec.
Thank you it helps!
But after solving the described above issue now it fails while trying to load the mean_density from the checkpoint. https://github.com/ashawkey/stable-dreamfusion/blob/3bd3c085afcf97c0a044e77088eee735076228b5/main.py#L148 The problem is, vanilla dreamfusion (without --dmtet) did not save any "mean_density" field in the checkpoint.
But after solving the described above issue now it fails while trying to load the mean_density from the checkpoint. https://github.com/ashawkey/stable-dreamfusion/blob/3bd3c085afcf97c0a044e77088eee735076228b5/main.py#L148 The problem is, vanilla dreamfusion (without --dmtet) did not save any "mean_density" field in the checkpoint.
Ok I get it. The reason is that I had to remove --cuda_ray flag from the python3 main.py --text "fantasy character dwarf, full height, realistic, high quality" --workspace trial -O --vram_O
because after the recent commit it stopped working and now it gives an error. Before the last commit it worked fine.
What you saying is remove --cuda_ray
from this code parser.add_argument('-O', action='store_true', help="equals --fp16 --cuda_ray --dir_text")
?
What you saying is remove
--cuda_ray
from this codeparser.add_argument('-O', action='store_true', help="equals --fp16 --cuda_ray --dir_text")
?
Yeah, I was forced to do it, since --cuda_ray stopped working for me after the recent commit (dmtet commit actually)