threestudio-project / threestudio

A unified framework for 3D content generation.
Apache License 2.0
6.32k stars 480 forks source link

Stable-Zero123: ImportError - Tiny CUDA nn - on training #432

Closed Mr-PBH closed 8 months ago

Mr-PBH commented 8 months ago

I have tried training with Stable Zero123 without success. I get the same error with Docker compose and WSL2 Ubuntu 22.04 LTS. My specs are Ryzen 9 7950X3D, 128GB 5600MT/s, 4060 TI 16GB, Win11 Pro.

I followed Jordain's video with WSL2 and used his website and everything installed without issue.

But when it can time to train it had an ImportError with tinycudann. tinycudann_ImportError.txt

Here is my conda list. Conda_List.txt

here are my CUDA and Python version (threestudio) ai@AI-DESKTOP:~/threestudio$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Tue_Feb__7_19:32:13_PST_2023 Cuda compilation tools, release 12.1, V12.1.66 Build cuda_12.1.r12.1/compiler.32415258_0 (threestudio) ai@AI-DESKTOP:~/threestudio$ python3 --version Python 3.10.13

If anyone has any ideas to help it would be appreciated. I mainly am looking to create 3D models for 3D printing.

obywan commented 8 months ago

Check if this helps.

Also you would probably run out of video memory afterwards, during training process (I have similar setup). Apparently 16GB is way to low for this process. If you do, try reducing num_samples_per_ray in stable-zero123.yaml, just to see if anything works at all.

Mr-PBH commented 8 months ago

I followed the link you sent. It allowed me to progress.

I changed num_samples_per_ray in stable-zero123.yaml from 512 to 320. I assumed its proportional from 24gb vram to 16gb vram and lowered it a hair to a more happy number (256 + 64).

I tried to train again but I am not sure if it was entirely successful. here is the log s-zer123_train_test_log.txt

If you would be so kind as to explain to me. Notably, the "NerfAcc: No CUDA toolkit found. NerfAcc will be disabled."

and

"AttributeError: 'NoneType' object has no attribute 'ray_aabb_intersect'"

Please and thank you for the quick responses.

obywan commented 8 months ago

It doesn't look like if finished successfully. Try setting num_samples_per_ray way lower to 128 and see if anything changes.

Mr-PBH commented 8 months ago

Didn't work. I'm just gonna start again from scratch and try to compile everything from source. :/

3dprintscanner commented 8 months ago

Hi, I believe a likely cause of this error is that the TinyCudaNN bindings are built against an incorrect base library which happens when you install threestudio with requirements.txt, try building the TinyCudaNN torch bindings themselves after doing the pip install -r requirements.txt for threestudio and it appears to fix the issue.