deepseek-ai / DreamCraft3D

[ICLR 2024] Official implementation of DreamCraft3D: Hierarchical 3D Generation with Bootstrapped Diffusion Prior
https://mrtornado24.github.io/DreamCraft3D/
MIT License
1.88k stars 81 forks source link

Meet some problems related to nvdiffrast when exporting meshes #28

Closed snowflakewang closed 6 months ago

snowflakewang commented 6 months ago

Hello, thank you for your brilliant work! I am running some cases based on your code. The first 3 stages (NeuS & NeRF, Geometry, and Texture) went well. But when exporting meshes, I meet the problem:

[F glutil.cpp:338] eglInitialize() failed

Seems that it is related to nvdiffrast. I tried some solutions from the Internet but they did not work. In the .yaml file:

renderer_type: "nvdiff-rasterizer"
renderer:
    context_type: cuda

So I have used dr.RasterizeCudaContext instead of dr.RasterizeGLContext.

Looking forward to your reply, thanks a lot :)

MrTornado24 commented 6 months ago

Hi, did you try system.exporter.context_type=cuda?

snowflakewang commented 6 months ago

Thanks a lot. I ran the command:

python launch.py --config configs/dreamcraft3d-mesh.yaml --export system.prompt_processor.prompt="$prompt" data.image_path="$image_path" system.exporter_type=mesh-exporter system.exporter.context_type="cuda" system.geometry_convert_from="$ckpt"

Your solution works me! Many thanks to you!!! :)