buaacyw / GaussianEditor

[CVPR 2024] GaussianEditor: Swift and Controllable 3D Editing with Gaussian Splatting
https://buaacyw.github.io/gaussian-editor/
Other
983 stars 46 forks source link

FileNotFoundError: [WinError 2] #4

Open shengyu-meng opened 7 months ago

shengyu-meng commented 7 months ago

I have tried to install it on windows and seems everything has been correctly set up. However, when I try to run the webui.py, I meet bellow errors:

`(GaussianEditor) PS D:\01_DL\GaussianEditor> python webui.py --gs_source D:\01_DL\gaussian-splatting\output\armour_museum_house_center-600F_896-20F-CF1-1K6_cyberpunck\point_cloud\iteration_50000\point_cloud.ply --colmap_dir D:\01_DL\gaussian-splatting\data\finland\armour_museum_house_center-600F_896-20F-CF1_cyberpuck-1K6 Reading camera 502/502 C:\ProgramData\Miniconda3\envs\GaussianEditor\lib\site-packages\torch\functional.py:504: 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:3484.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] final text_encoder_type: bert-base-uncased Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.transform.dense.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.bias']

System: Windows 10, Cuda 11.7, torch 2.0.1, Rtx 3090, Python 3.10.12

buaacyw commented 7 months ago

It seems to be caused by Viser. Have you tried run command line version (i.e. without WebUI)

shengyu-meng commented 7 months ago

It seems to be caused by Viser. Have you tried run command line version (i.e. without WebUI)

Thanks for your reply. I have tried to run the command line and meet another issue, both on my windows 11 (RTX 3090, cuda 11.7) and ubuntu 20.04 system (Rtx 4090, cuda 11.8). I ensure I have installed pytorch with CUDA support and build the tiny-cuda-nn (include the pytorch extension).

python launch.py --config configs/edit-n2n.yaml --train --gpu 1 trainer.max_steps=2000 \ system.prompt_processor.prompt="Turn the scene into an arsenal of future weapons in the style of cyberpunk" \ system.max_densify_percent=0.03 system.anchor_weight_init_g0=0.0 system.anchor_weight_init=0.02 system.anchor_weight_multiplier=1.3 \ system.seg_prompt="man" system.loss.lambda_anchor_color=5 system.loss.lambda_anchor_geo=50 system.loss.lambda_anchor_scale=50 \ system.loss.lambda_anchor_opacity=50 system.densify_from_iter=100 system.densify_until_iter=5000 \ system.densification_interval=300 data.source=autodl-tmp/3DGS_upload/data/armour_museum_house_center-600F_896-20F-CF1_cyberpuck-1K6 \ system.gs_source=autodl-tmp/3DGS_upload/output/armour_museum_house_center-600F_896-20F-CF1-1K6_cyberpunck/point_cloud/iteration_50000/point_cloud.ply \ system.loggers.wandb.enable=true system.loggers.wandb.name="edit_scene_to_cyberpunk" Traceback (most recent call last): File "launch.py", line 250, in <module> main(args, extras) File "launch.py", line 74, in main import threestudio File "/root/GaussianEditor/threestudio/__init__.py", line 36, in <module> from . import data, models, systems File "/root/GaussianEditor/threestudio/data/__init__.py", line 1, in <module> from . import gs_load File "/root/GaussianEditor/threestudio/data/gs_load.py", line 11, in <module> from threestudio.utils.base import Updateable File "/root/GaussianEditor/threestudio/utils/__init__.py", line 1, in <module> from . import base File "/root/GaussianEditor/threestudio/utils/base.py", line 7, in <module> from threestudio.utils.misc import get_device, load_module_weights File "/root/GaussianEditor/threestudio/utils/misc.py", line 5, in <module> import tinycudann as tcnn File "/root/miniconda3/lib/python3.8/site-packages/tinycudann/__init__.py", line 9, in <module> from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding File "/root/miniconda3/lib/python3.8/site-packages/tinycudann/modules.py", line 19, in <module> raise EnvironmentError("Unknown compute capability. Ensure PyTorch with CUDA support is installed.") OSError: Unknown compute capability. Ensure PyTorch with CUDA support is installed.

buaacyw commented 7 months ago

I have never met this error. Can you successfully import torch? Please check your torch version by torch.version and CUDA version with nvcc -V

shengyu-meng commented 7 months ago

I have never met this error. Can you successfully import torch? Please check your torch version by torch.version and CUDA version with nvcc -V

Sure. I have verified the installation of pytorch and tinycudann by:

`import torch print(torch.version) print(torch.cuda.is_available())

2.0.0+cu118 True`

and

`!python ./samples/mlp_learning_an_image_pytorch.py data/images/test.png data/config_hash.json

================================================================ This script replicates the behavior of the native CUDA example
mlp_learning_an_image.cu using tiny-cuda-nn's PyTorch extension.

Using PyTorch version 2.0.0+cu118 with CUDA 11.8 NetworkWithInputEncoding(n_input_dims=2, n_output_dims=3, seed=1337, dtype=torch.float16, hyperparams={'encoding': {'base_resolution': 16, 'hash': 'CoherentPrime', 'interpolation': 'Linear', 'log2_hashmap_size': 15, 'n_features_per_level': 2, 'n_levels': 16, 'otype': 'Grid', 'per_level_scale': 1.5, 'type': 'Hash'}, 'network': {'activation': 'ReLU', 'n_hidden_layers': 2, 'n_neurons': 64, 'otype': 'FullyFusedMLP', 'output_activation': 'None'}, 'otype': 'NetworkWithInputEncoding'}) /root/miniconda3/lib/python3.8/site-packages/torch/functional.py:504: 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:3483.) return _VF.meshgrid(tensors, *kwargs) # type: ignore[attr-defined] Writing 'reference.jpg'... done. Beginning optimization with 10000000 training steps. ./samples/mlp_learning_an_image_pytorch.py:70: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect. xs = xs torch.tensor([shape[1], shape[0]], device=xs.device).float() Step#0: loss=68.5625 time=1252960[µs] Writing '0.jpg'... done. Step#10: loss=0.5341796875 time=20094[µs] Writing '10.jpg'... done. Step#100: loss=0.01119232177734375 time=181919[µs] Writing '100.jpg'... done. Step#1000: loss=0.0004858970642089844 time=2387365[µs] Writing '1000.jpg'... done.`

ScienceLi1125 commented 5 months ago

It seems to be caused by Viser. Have you tried run command line version (i.e. without WebUI)

Thanks for your reply. I have tried to run the command line and meet another issue, both on my windows 11 (RTX 3090, cuda 11.7) and ubuntu 20.04 system (Rtx 4090, cuda 11.8). I ensure I have installed pytorch with CUDA support and build the tiny-cuda-nn (include the pytorch extension).

python launch.py --config configs/edit-n2n.yaml --train --gpu 1 trainer.max_steps=2000 \ system.prompt_processor.prompt="Turn the scene into an arsenal of future weapons in the style of cyberpunk" \ system.max_densify_percent=0.03 system.anchor_weight_init_g0=0.0 system.anchor_weight_init=0.02 system.anchor_weight_multiplier=1.3 \ system.seg_prompt="man" system.loss.lambda_anchor_color=5 system.loss.lambda_anchor_geo=50 system.loss.lambda_anchor_scale=50 \ system.loss.lambda_anchor_opacity=50 system.densify_from_iter=100 system.densify_until_iter=5000 \ system.densification_interval=300 data.source=autodl-tmp/3DGS_upload/data/armour_museum_house_center-600F_896-20F-CF1_cyberpuck-1K6 \ system.gs_source=autodl-tmp/3DGS_upload/output/armour_museum_house_center-600F_896-20F-CF1-1K6_cyberpunck/point_cloud/iteration_50000/point_cloud.ply \ system.loggers.wandb.enable=true system.loggers.wandb.name="edit_scene_to_cyberpunk" Traceback (most recent call last): File "launch.py", line 250, in <module> main(args, extras) File "launch.py", line 74, in main import threestudio File "/root/GaussianEditor/threestudio/__init__.py", line 36, in <module> from . import data, models, systems File "/root/GaussianEditor/threestudio/data/__init__.py", line 1, in <module> from . import gs_load File "/root/GaussianEditor/threestudio/data/gs_load.py", line 11, in <module> from threestudio.utils.base import Updateable File "/root/GaussianEditor/threestudio/utils/__init__.py", line 1, in <module> from . import base File "/root/GaussianEditor/threestudio/utils/base.py", line 7, in <module> from threestudio.utils.misc import get_device, load_module_weights File "/root/GaussianEditor/threestudio/utils/misc.py", line 5, in <module> import tinycudann as tcnn File "/root/miniconda3/lib/python3.8/site-packages/tinycudann/__init__.py", line 9, in <module> from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding File "/root/miniconda3/lib/python3.8/site-packages/tinycudann/modules.py", line 19, in <module> raise EnvironmentError("Unknown compute capability. Ensure PyTorch with CUDA support is installed.") OSError: Unknown compute capability. Ensure PyTorch with CUDA support is installed.

I have met the same error called OSError: Unknown compute capability. Ensure PyTorch with CUDA support is installed., but I tried to import torch in a test file it did work. Later, my friend told me the error was caused by the optional parameters --gpu. After I set it to 0, and the problem was solved.

sucy171106 commented 4 months ago

I have tried to install it on windows and seems everything has been correctly set up. However, when I try to run the webui.py, I meet bellow errors:

`(GaussianEditor) PS D:\01_DL\GaussianEditor> python webui.py --gs_source D:\01_DL\gaussian-splatting\output\armour_museum_house_center-600F_896-20F-CF1-1K6_cyberpunck\point_cloud\iteration_50000\point_cloud.ply --colmap_dir D:\01_DL\gaussian-splatting\data\finland\armour_museum_house_center-600F_896-20F-CF1_cyberpuck-1K6 Reading camera 502/502 C:\ProgramData\Miniconda3\envs\GaussianEditor\lib\site-packages\torch\functional.py:504: 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:3484.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] final text_encoder_type: bert-base-uncased Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.transform.dense.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.bias']

  • This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).

  • This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model). Model loaded from C:\Users\dell.cache\huggingface\hub\models--ShilongLiu--GroundingDINO\snapshots\a94c9b567a2a374598f05c584e96798a170c56fb\groundingdino_swinb_cogcoor.pth => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight']) (viser) No client build found. Building now... C:\ProgramData\Miniconda3\envs\GaussianEditor\lib\site-packages\nodeenv.py:48: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import parse_version

  • Environment already exists: D:\01_DL\GaussianEditor\extern\viser\src\viser\client.nodeenv Traceback (most recent call last): File "D:\01_DL\GaussianEditor\webui.py", line 1540, in webui = WebUI(args) File "D:\01_DL\GaussianEditor\webui.py", line 156, in init self.server = viser.ViserServer(port=self.port) File "D:\01_DL\GaussianEditor\extern\viser\src\viser_viser.py", line 326, in init _client_autobuild.ensure_client_is_built() File "D:\01_DL\GaussianEditor\extern\viser\src\viser_client_autobuild.py", line 57, in ensure_client_is_built env_dir = _install_sandboxed_node() File "D:\01_DL\GaussianEditor\extern\viser\src\viser_client_autobuild.py", line 81, in _install_sandboxed_node subprocess.run( File "C:\ProgramData\Miniconda3\envs\GaussianEditor\lib\subprocess.py", line 503, in run with Popen(*popenargs, kwargs) as process: File "C:\ProgramData\Miniconda3\envs\GaussianEditor\lib\subprocess.py", line 971, in init** self._execute_child(args, executable, preexec_fn, close_fds, File "C:\ProgramData\Miniconda3\envs\GaussianEditor\lib\subprocess.py", line 1456, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 系统找不到指定的文件。`

System: Windows 10, Cuda 11.7, torch 2.0.1, Rtx 3090, Python 3.10.12 I also met this error after the second step of "add", after clicked ending 2d inpainting

image

System: Windows 11, Cuda 11.8, torch 2.0.1, Rtx 4080, Python 3.10