stable-dreamfusion icon indicating copy to clipboard operation
stable-dreamfusion copied to clipboard

Launching main.py with --dmtet flag fails with an error

Open SavvaI opened this issue 1 year ago • 8 comments

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

  1. Build docker from dockerfile
  2. Train dreamfusion python3 main.py --text "fantasy character dwarf, full height, realistic, high quality" --workspace trial -O --vram_O
  3. 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
  4. Get an error

Expected Behavior

Finetuned with dmtet mesh

Environment

Ubuntu 20.04.5 LTS, PyTorch 1.12, CUDA 11.6

SavvaI avatar Apr 07 '23 20:04 SavvaI

@SavvaI Hi, please check https://github.com/ashawkey/stable-dreamfusion#trouble-shooting.

ashawkey avatar Apr 08 '23 01:04 ashawkey

@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

SavvaI avatar Apr 08 '23 10:04 SavvaI

Solution

Go to ./nerf/renderer.py Replace dr.RasterizeGLContext to dr.RasterizeCudaContext It work well!! So does the same problem in GET3D and nvdiffrec.

Walterkd avatar Apr 09 '23 12:04 Walterkd

Solution

Go to ./nerf/renderer.py Replace dr.RasterizeGLContext to dr.RasterizeCudaContext It work well!! So does the same problem in GET3D and nvdiffrec.

Thank you it helps!

SavvaI avatar Apr 09 '23 15:04 SavvaI

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.

SavvaI avatar Apr 09 '23 15:04 SavvaI

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.

SavvaI avatar Apr 09 '23 19:04 SavvaI

What you saying is remove --cuda_ray from this code parser.add_argument('-O', action='store_true', help="equals --fp16 --cuda_ray --dir_text") ?

Walterkd avatar Apr 10 '23 01:04 Walterkd

What you saying is remove --cuda_ray from this code parser.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)

SavvaI avatar Apr 10 '23 20:04 SavvaI