bmaltais / kohya_ss

Apache License 2.0
9.43k stars 1.22k forks source link

Trouble with TensorRT... can't be found, though it is installed (Kubuntu 24.04) #2571

Open crotalidae75 opened 3 months ago

crotalidae75 commented 3 months ago

I'm attempting to run Kohya under Linux, on Kubuntu 24.04, (with a 4080 Super & Ryzen 5900x), but I keeping having issues regarding it not finding tensorrt.

I'm using pyenv to use the required Python 3.10.14 needed to run Kohya, and I do have tensorrt and tensorflow installed in ~/.pyenv/versions/3.10.14/lib/python3.10/site-packages/. Kohya still spits out an error about not being able to find it, and I don't really know how to resolve this. I've also exported the tensorrt folder location - I think this correct, at least:

_export LD_LIBRARYPATH=/home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/

user@ryzen:~/kohya_ss$ ./gui.sh
16:15:12-391608 INFO     Kohya_ss GUI version: v24.1.4                                                                                                     
16:15:12-416086 INFO     Submodule initialized and updated.                                                                                                
16:15:12-417070 INFO     nVidia toolkit detected                                                                                                           
16:15:13-318130 INFO     Torch 2.1.2+cu118                                                                                                                 
16:15:13-331048 INFO     Torch backend: nVidia CUDA 11.8 cuDNN 8700                                                                                        
16:15:13-346270 INFO     Torch detected GPU: NVIDIA GeForce RTX 4080 SUPER VRAM 16069 Arch (8, 9) Cores 80                                                 
16:15:13-349324 INFO     Python version is 3.10.14 (main, Apr 22 2024, 18:35:21) [GCC 13.2.0]                                                              
16:15:13-350156 INFO     Verifying modules installation status from /home/crotalus/kohya_ss/requirements_linux.txt...                                      
16:15:13-352790 INFO     Verifying modules installation status from requirements.txt...                                                                    
2024-06-06 16:15:15.321907: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-06-06 16:15:15.321934: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-06-06 16:15:15.322836: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-06-06 16:15:15.327211: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-06 16:15:15.971497: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
16:15:17-994411 INFO     headless: False                                                                                                                   
16:15:18-168090 INFO     Using shell=True when running external commands...                                                                                
IMPORTANT: You are using gradio version 4.26.0, however version 4.29.0 is available, please upgrade.
--------
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

For that matter, I am not sure what the other CUDA errors are, or how to fix them. I was under the impression that without TensorRT, Kohya won't run properly. Any ideas on how to fix these problems on Linux?

b-fission commented 3 months ago

Those warnings can be ignored... they're coming from the tensorflow package which is only there as a dependency for tensorboard.

kohya uses PyTorch to train models. TensorRT won't be used whatsoever.

crotalidae75 commented 3 months ago

Those warnings can be ignored... they're coming from the tensorflow package which is only there as a dependency for tensorboard.

kohya uses PyTorch to train models. TensorRT won't be used whatsoever.

Thanks for the info, though I still am having an issue with starting training, with regards to the accelerate site-package. I'll post a separate message though.

MorrisLu-Taipei commented 1 month ago

Those warnings can be ignored... they're coming from the tensorflow package which is only there as a dependency for tensorboard.

kohya uses PyTorch to train models. TensorRT won't be used whatsoever.

thanks for your information, there information is really annoying