cxh0519 / threestudio-gaussiandreamer

GaussianDreamer extension of threestudio.
MIT License
44 stars 3 forks source link

Mesh export error (what tag am I missing?) #6

Open hayoung-jeremy opened 8 months ago

hayoung-jeremy commented 8 months ago

summary

reproduction of the error

cxh0519 commented 8 months ago

You might remove all system-related parameters and try again. See the example provided in threestudio-3dgs: python launch.py --config path/to/config --export --gpu 0 system.prompt_processor.prompt="a delicious hamburger" resume=path/to/last.ckpt

hayoung-jeremy commented 8 months ago

Thank you for the reply, but encountered another error :

codyreading commented 7 months ago

Hey @cxh0519

I noticed this too, where did you get this code from? Looks like this function is missing.

codyreading commented 7 months ago

Hey @cxh0519 and @hayoung-jeremy

It was just a missing function from DreamGaussian, I was able to fix that here: https://github.com/cxh0519/threestudio-gaussiandreamer/pull/8

hayoung-jeremy commented 7 months ago

Thank you for the reply @codyreading , below is the mesh export command after applying your pull request, and the result message :

python launch.py --config outputs/gs-sds-mvdream/a_blue_denim_jacket@20240412-015957/configs/parsed.yaml --export --gpu 0 resume=outputs/gs-sds-mvdream/a_blue_denim_jacket@20240412-015957/ckpts/last.ckpt system.exporter_type=mesh-exporter system.exporter.context_type=cuda

the result message :

[INFO] Loaded Multiview Diffusion!
[INFO] Using prompt [a blue denim jacket] and negative prompt [ugly, bad anatomy, blurry, pixelated obscure, unnatural colors, poor lighting, dull, and unclear, cropped, lowres, low quality, artifacts, duplicate, morbid, mutilated, poorly drawn face, deformed, dehydrated, bad proportions, unfocused]
[INFO] Using view-dependent prompts [side]:[a blue denim jacket, side view] [front]:[a blue denim jacket, front view] [back]:[a blue denim jacket, back view] [overhead]:[a blue denim jacket, overhead view]
[INFO] GPU available: True (cuda), used: True
[INFO] TPU available: False, using: 0 TPU cores
[INFO] IPU available: False, using: 0 IPUs
[INFO] HPU available: False, using: 0 HPUs
[INFO] You are using a CUDA device ('NVIDIA A100-SXM4-40GB') that has Tensor Cores. To properly utilize them, you should set `torch.set_float32_matmul_precision('medium' | 'high')` which will trade-off precision for performance. For more details, read https://pytorch.org/docs/stable/generated/torch.set_float32_matmul_precision.html#torch.set_float32_matmul_precision
[INFO] Restoring states from the checkpoint path at outputs/gs-sds-mvdream/a_blue_denim_jacket@20240412-015957/ckpts/last.ckpt
[INFO] Number of points at initialisation:334614
[INFO] LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
[INFO] Loaded model weights from the checkpoint at outputs/gs-sds-mvdream/a_blue_denim_jacket@20240412-015957/ckpts/last.ckpt
/home/dreamer/.local/lib/python3.10/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:441: The 'predict_dataloader' does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` to `num_workers=29` in the `DataLoader` to improve performance.
Predicting DataLoader 0:   0%|                                                                                                                                                                                                                                            | 0/120 [00:00<?, ?it/s]/home/dreamer/.local/lib/python3.10/site-packages/pytorch_lightning/loops/prediction_loop.py:255: predict returned None if it was on purpose, ignore this warning...
Predicting DataLoa/home/dreamer/.local/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)0:07<00:00, 15.84it/s]  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
16it [00:12,  1.33it/s]
[INFO] mesh cleaning: (55622, 3) --> (39172, 3), (112100, 3) --> (79397, 3)
[INFO] marching cubes result: torch.Size([39172, 3]) (-0.6717594861984253-0.6467556357383728), torch.Size([79397, 3])
Predicting DataLoader 0: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 120/120 [00:25<00:00,  4.65it/s][INFO] Export assets saved to outputs/gs-sds-mvdream/a_blue_denim_jacket@20240412-015957/save

result

codyreading commented 7 months ago

Hey @hayoung-jeremy

Yeah I took a look at the implementation, I don't think the textured mesh is implemented at all.

I believe it is a part of the DreamGaussian codebase so it can be brought over.