AiuniAI / Unique3D

Official implementation of Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image
https://wukailu.github.io/Unique3D/
MIT License
1.96k stars 131 forks source link

OnnxRuntime is not using GPU #35

Open bianyunzhi95 opened 1 week ago

bianyunzhi95 commented 1 week ago

When I try to run conversion after running server, I get these warning messages, and it takes forever and never completes.

To create a public link, set `share=True` in `launch()`.
  0%|                                                                                        | 0/30 [00:00<?, ?it/s]Warning! condition_latents is not None, but self_attn_ref is not enabled! This warning will only be raised once.
100%|███████████████████████████████████████████████████████████████████████████████| 30/30 [00:03<00:00,  8.44it/s]
100%|███████████████████████████████████████████████████████████████████████████████| 10/10 [00:05<00:00,  1.89it/s]
/****/Unique3D/venv/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'TensorrtExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
  warnings.warn(
/****/Unique3D/venv/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
  warnings.warn(

Below is requirements.txt I used to install environment. I am using RTX 3090 Ti and have nvidia driver 535 and cuda 12.1 installed on ubuntu 22.02.

accelerate==0.29.2
datasets==2.18.0
diffusers==0.27.2
fire==0.6.0
gradio==4.32.0
jaxtyping==0.2.29
numba==0.59.1
numpy==1.26.4
git+https://github.com/NVlabs/nvdiffrast.git
omegaconf==2.3.0
onnxruntime_gpu==1.17.0
opencv_python==4.9.0.80
opencv_python_headless==4.9.0.80
ort_nightly_gpu
peft==0.10.0
Pillow==10.3.0
pygltflib==1.16.2
pymeshlab==2023.12.post1
git+https://github.com/facebookresearch/pytorch3d.git@v0.7.6
rembg==2.0.56
torch==2.1.0+cu121
torch_scatter==2.1.2
tqdm==4.64.1
transformers==4.39.3
trimesh==4.3.0
typeguard==2.13.3
wandb==0.16.6
jtydhr88 commented 5 days ago

if you are on CUDA12.1, I don't think you can install default onnxruntime_gpu==1.17.0, just like I mentioned in https://github.com/AiuniAI/Unique3D/issues/40, for according to onnxruntime official doc - https://onnxruntime.ai/docs/install/, the correct install of onnxruntime should be: pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

you need to uninstall onnxruntime, onnxruntime_gpu first, then re-install them.