error while running it in colab

#2
by obi77 - opened

tried running this demo on colab with this code

!git clone https://huggingface.co/spaces/jiawei011/dreamgaussian

%cd /content/dreamgaussian
!pip install -q -r requirements.txt

!pip install git+https://github.com/graphdeco-inria/diff-gaussian-rasterization.git

!python app.py --share

error traceback

Obtaining file:///content/dreamgaussian/simple-knn
  Preparing metadata (setup.py) ... done
Installing collected packages: simple-knn
  Attempting uninstall: simple-knn
    Found existing installation: simple-knn 0.0.0
    Uninstalling simple-knn-0.0.0:
      Successfully uninstalled simple-knn-0.0.0
  Running setup.py develop for simple-knn
Successfully installed simple-knn-0.0.0
Caching examples at: '/content/dreamgaussian/gradio_cached_examples/18'
Caching example 1/5
[INFO] loading image tmp_data/tmp.png...
[INFO] background removal...
[INFO] recenter...
[INFO] load image from tmp_data/tmp_rgba.png...
Number of points at initialisation :  5000
[INFO] loading zero123...
2023-10-11 13:55:08.434296: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Loading pipeline components...: 100% 6/6 [00:01<00:00,  5.87it/s]
[INFO] loaded zero123!
  0% 0/500 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/content/dreamgaussian/main.py", line 882, in <module>
    gui.train(opt.iters)
  File "/content/dreamgaussian/main.py", line 858, in train
    self.train_step()
  File "/content/dreamgaussian/main.py", line 177, in train_step
    out = self.renderer.render(cur_cam)
  File "/content/dreamgaussian/gs_renderer.py", line 798, in render
    rendered_image, radii, rendered_depth, rendered_alpha = rasterizer(
ValueError: not enough values to unpack (expected 4, got 2)
Traceback (most recent call last):
  File "/content/dreamgaussian/main2.py", line 664, in <module>
    raise ValueError(f"Cannot find mesh from {default_path}, must specify --mesh explicitly!")
ValueError: Cannot find mesh from logs/tmp_mesh.glb, must specify --mesh explicitly!
Traceback (most recent call last):
  File "/content/dreamgaussian/app.py", line 100, in <module>
    gr.Examples(
  File "/usr/local/lib/python3.10/dist-packages/gradio/helpers.py", line 75, in create_examples
    client_utils.synchronize_async(examples_obj.create)
  File "/usr/local/lib/python3.10/dist-packages/gradio_client/utils.py", line 540, in synchronize_async
    return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)  # type: ignore
  File "/usr/local/lib/python3.10/dist-packages/fsspec/asyn.py", line 106, in sync
    raise return_result
  File "/usr/local/lib/python3.10/dist-packages/fsspec/asyn.py", line 61, in _runner
    result[0] = await coro
  File "/usr/local/lib/python3.10/dist-packages/gradio/helpers.py", line 277, in create
    await self.cache()
  File "/usr/local/lib/python3.10/dist-packages/gradio/helpers.py", line 338, in cache
    prediction = await Context.root_block.process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1563, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1451, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/usr/local/lib/python3.10/dist-packages/gradio/components/model3d.py", line 172, in postprocess
    "name": self.make_temp_copy_if_needed(y),
  File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 233, in make_temp_copy_if_needed
    temp_dir = self.hash_file(file_path)
  File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 197, in hash_file
    with open(file_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'logs/tmp_mesh.glb'

Can you try again using the updated codebase to see if the error persists?

looks like the same problem still presists

Obtaining file:///content/dreamgaussian/simple-knn
  Preparing metadata (setup.py) ... done
Installing collected packages: simple-knn
  Attempting uninstall: simple-knn
    Found existing installation: simple-knn 0.0.0
    Uninstalling simple-knn-0.0.0:
      Successfully uninstalled simple-knn-0.0.0
  Running setup.py develop for simple-knn
Successfully installed simple-knn-0.0.0
Obtaining file:///content/dreamgaussian/diff-gaussian-rasterization
ERROR: file:///content/dreamgaussian/diff-gaussian-rasterization does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
Caching examples at: '/content/dreamgaussian/gradio_cached_examples/18'
Caching example 1/5
[INFO] loading image tmp_data/0d6e37451ce97b5e97dd74e63f9a06b17644f2ad02f32534ce079493808d288f.png...
[INFO] background removal...
[INFO] recenter...
[INFO] load image from tmp_data/0d6e37451ce97b5e97dd74e63f9a06b17644f2ad02f32534ce079493808d288f_rgba.png...
Number of points at initialisation :  5000
[INFO] loading zero123...
2023-10-12 11:18:13.468260: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Loading pipeline components...: 100% 6/6 [00:01<00:00,  5.78it/s]
[INFO] loaded zero123!
  0% 0/500 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/content/dreamgaussian/main.py", line 882, in <module>
    gui.train(opt.iters)
  File "/content/dreamgaussian/main.py", line 858, in train
    self.train_step()
  File "/content/dreamgaussian/main.py", line 177, in train_step
    out = self.renderer.render(cur_cam)
  File "/content/dreamgaussian/gs_renderer.py", line 798, in render
    rendered_image, radii, rendered_depth, rendered_alpha = rasterizer(
ValueError: not enough values to unpack (expected 4, got 2)
Traceback (most recent call last):
  File "/content/dreamgaussian/main2.py", line 664, in <module>
    raise ValueError(f"Cannot find mesh from {default_path}, must specify --mesh explicitly!")
ValueError: Cannot find mesh from logs/0d6e37451ce97b5e97dd74e63f9a06b17644f2ad02f32534ce079493808d288f_mesh.glb, must specify --mesh explicitly!
Traceback (most recent call last):
  File "/content/dreamgaussian/app.py", line 105, in <module>
    gr.Examples(
  File "/usr/local/lib/python3.10/dist-packages/gradio/helpers.py", line 75, in create_examples
    client_utils.synchronize_async(examples_obj.create)
  File "/usr/local/lib/python3.10/dist-packages/gradio_client/utils.py", line 540, in synchronize_async
    return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)  # type: ignore
  File "/usr/local/lib/python3.10/dist-packages/fsspec/asyn.py", line 106, in sync
    raise return_result
  File "/usr/local/lib/python3.10/dist-packages/fsspec/asyn.py", line 61, in _runner
    result[0] = await coro
  File "/usr/local/lib/python3.10/dist-packages/gradio/helpers.py", line 277, in create
    await self.cache()
  File "/usr/local/lib/python3.10/dist-packages/gradio/helpers.py", line 338, in cache
    prediction = await Context.root_block.process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1563, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1451, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/usr/local/lib/python3.10/dist-packages/gradio/components/model3d.py", line 172, in postprocess
    "name": self.make_temp_copy_if_needed(y),
  File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 233, in make_temp_copy_if_needed
    temp_dir = self.hash_file(file_path)
  File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 197, in hash_file
    with open(file_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'logs/0d6e37451ce97b5e97dd74e63f9a06b17644f2ad02f32534ce079493808d288f_mesh.glb'

solution 1: does make the gradio app start, but as soon as I hit the button to generate the 3d mesh the same error pops up.
solution 2: I got an other error FileNotFoundError: [Errno 2] No such file or directory: 'python process.py tmp_data/tmp.png'
solution 3: works perfectly, but it just shows a video, not as interactive as your lovely demo

anyway thank you for your help, if you have any solutions I will be thankful, otherwise your free to close this discussion. Thank you!!!

Hi! Thanks for trying our demo :) We appreciate you reporting this error and trying to resolve it.

The previous errors are very likely to be caused by the unsuccessful installation of diff-gaussian-rasterization, so we have standardised the installation for the dependencies and you can refer to this Colab link that we just published to run our gradio demo
https://colab.research.google.com/drive/1owXJthskHoVXBNvxUB0Bg0JP2Rc7QsTe?usp=sharing

The packages that we installed for the Colab demo relates to diff-gaussian-rasterization are from https://github.com/camenduru/diff-gaussian-rasterization
Thanks for the great work @camenduru

Sign up or log in to comment