-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ONNXRuntimeError when trying to convert images. #31
Comments
hi, regarding to the *************** EP Error ***************, you need to configure TensorRT on your end, see #15 |
Thank you, I will try this out :) |
same error, (unique3d-python310) F:\Unique3D>python app/gradio_local.py --port 7860 To create a public link, set *************** EP Error *************** 2024-07-04 20:27:21.6046424 [E:onnxruntime:Default, provider_bridge_ort.cc:1745 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1426 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Anaconda3\envs\unique3d-python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll" Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
安装指南首先就有有问题,xformers不支持2.3.1版本,pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu121 这么搞会由于没有合适的版本一直循环下载xformers,简直崩溃了。 pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 若是先这么搞,再安装xformers会把torch2.3.1+cu121卸载自动安装torch2.3.0+cpu,然后xformers又提示无法load cuda啥的。这时得手动卸载torch再pip install torch==2.3.0+cu121 https://download.pytorch.org/whl/cu121. 还有清华源里没ort_nightly_gpu,requirements因为这个安装卡壳。得用这个 import onnxruntime onnxruntime.get_available_providers() 显示 python 3.11 3.10我都试过了不行,可能改天再试一下cuda卸载换cu118再搞一次?我发现把onnxruntime-gpu卸载了安装onnxruntime可以运行起来,不过也会出现大堆报错,只成功生成出一次mesh。 作者大哥看看有啥办法 |
只需要执行
|
So I was able to build under Windows 11 using Python 3.11.9 with a virtual environment
To get the installation to work, I had to do the following:
This got the packages to setup and install correctly.
I then used git with lfs to checkout the checkpoints, and after doing a git lfs pull on that, I moved the ckpt folder into the same folder as Unique3D as per the instructions.
I am then able to run the UI with
python app/gradio_local.py --port 7860
from the activated virtual environment.
However, when I try and convert an image, it gets about half way, and gives me an error:
2024-06-17 13:35:55.9492693 [E:onnxruntime:Default, provider_bridge_ort.cc:1730 onnxruntime::TryGetProviderInfo_TensorRT] C:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1426 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\git\Unique3D\unique3d\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"
Note that during the install I did answer Y to have it uninstall onnxruntime and install the version it wanted.
However, on failing like this, it appears to fall back to CPU mode, and then takes literally forever, its giving me a 12 hour plus ETA for the demo image of baby groot.
`
(unique3d) D:\git\Unique3D>python app/gradio_local.py --port 7860
Warning:
Unable to load the following plugins:
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\filter_embree.dll: The specified module could not be found.
filter_func.dll: filter_func.dll does not seem to be a Qt Plugin.
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\filter_func.dll: The specified module could not be found.
filter_mesh_alpha_wrap.dll: filter_mesh_alpha_wrap.dll does not seem to be a Qt Plugin.
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\filter_mesh_alpha_wrap.dll: The specified module could not be found.
filter_mesh_booleans.dll: filter_mesh_booleans.dll does not seem to be a Qt Plugin.
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\filter_mesh_booleans.dll: The specified module could not be found.
filter_sketchfab.dll: filter_sketchfab.dll does not seem to be a Qt Plugin.
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\filter_sketchfab.dll: The specified module could not be found.
io_3ds.dll: io_3ds.dll does not seem to be a Qt Plugin.
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\io_3ds.dll: The specified module could not be found.
io_e57.dll: io_e57.dll does not seem to be a Qt Plugin.
Cannot load library D:\git\Unique3D\unique3d\Lib\site-packages\pymeshlab\lib\plugins\io_e57.dll: The specified module could not be found.
Warning! extra parameter in cli is not verified, may cause erros.
Loading pipeline components...: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 12.92it/s]
You have disabled the safety checker for <class 'custum_3d_diffusion.custum_pipeline.unifield_pipeline_img2mvimg.StableDiffusionImage2MVCustomPipeline'> by passing
safety_checker=None
. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at huggingface/diffusers#254 .Warning! extra parameter in cli is not verified, may cause erros.
D:\git\Unique3D\unique3d\Lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning:
resume_download
is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, useforce_download=True
.warnings.warn(
Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 5018.31it/s]
You have disabled the safety checker for <class 'custum_3d_diffusion.custum_pipeline.unifield_pipeline_img2img.StableDiffusionImageCustomPipeline'> by passing
safety_checker=None
. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at huggingface/diffusers#254 .D:\git\Unique3D\unique3d\Lib\site-packages\torch\utils\cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
Loading pipeline components...: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:02<00:00, 2.48it/s]
Pipelines loaded with
dtype=torch.float16
cannot run withcpu
device. It is not recommended to move them tocpu
as running them will fail. Please make sure to use an accelerator to run the pipeline in inference, due to the lack of support forfloat16
operations on this device in PyTorch. Please, remove thetorch_dtype=torch.float16
argument, or use another device for inference.Pipelines loaded with
dtype=torch.float16
cannot run withcpu
device. It is not recommended to move them tocpu
as running them will fail. Please make sure to use an accelerator to run the pipeline in inference, due to the lack of support forfloat16
operations on this device in PyTorch. Please, remove thetorch_dtype=torch.float16
argument, or use another device for inference.Pipelines loaded with
dtype=torch.float16
cannot run withcpu
device. It is not recommended to move them tocpu
as running them will fail. Please make sure to use an accelerator to run the pipeline in inference, due to the lack of support forfloat16
operations on this device in PyTorch. Please, remove thetorch_dtype=torch.float16
argument, or use another device for inference.Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00, 5994.72it/s]
Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=True
inlaunch()
.D:\git\Unique3D\unique3d\Lib\site-packages\diffusers\models\attention_processor.py:1279: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:455.)
hidden_states = F.scaled_dot_product_attention(
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 [41:12<00:00, 82.41s/it]
D:\git\Unique3D\unique3d\Lib\site-packages\torch\nn\modules\conv.py:456: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ..\aten\src\ATen\native\cudnn\Conv_v8.cpp:919.)
return F.conv2d(input, weight, bias, self.stride,
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [04:31<00:00, 27.17s/it]
2024-06-17 13:35:55.9492693 [E:onnxruntime:Default, provider_bridge_ort.cc:1730 onnxruntime::TryGetProviderInfo_TensorRT] C:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1426 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\git\Unique3D\unique3d\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"
*************** EP Error ***************
EP Error C:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:456 onnxruntime::python::RegisterTensorRTPluginsAsCustomOps Please install TensorRT libraries as mentioned in the GPU requirements page, make sure they're in the PATH or LD_LIBRARY_PATH, and that your GPU is supported.
when using [('TensorrtExecutionProvider', {'device_id': 0, 'trt_max_workspace_size': 8589934592, 'trt_fp16_enable': True, 'trt_engine_cache_enable': True}), ('CUDAExecutionProvider', {'device_id': 0, 'arena_extend_strategy': 'kSameAsRequested', 'gpu_mem_limit': 8589934592, 'cudnn_conv_algo_search': 'HEURISTIC'})]
Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.
7%|██████████▌ | 2/30 [35:05<8:38:59, 1112.11s/it]
`
There is some debug output showing the error in question.
Please advise on how I can perhaps resolve the issue to it can find the right files ?
I also came across this bug for a similar error danielgatis/rembg#312 which seems to show that it fails because the linked cuda dlls are not found in the path it is expecting. I am not sure I am clued up enough to resolve this myself however.
If you have any advise on things I can try, please let me know.
Thanks,
Steelsteed.
The text was updated successfully, but these errors were encountered: