ultralytics
ultralytics copied to clipboard
After installing the ultralytics library, GPU usage decreased by half and Ksampler time doubled
Search before asking
- [X] I have searched the Ultralytics YOLO issues and found no similar bug report.
Ultralytics YOLO Component
Other
Bug
https://github.com/comfyanonymous/ComfyUI
I am using the most basic SDdemo, and the performance during inference is shown below. The Ksampler phase only took 0.85 seconds,GPU usage rate is close to 100%
However, when I installed ultralytics and added a line "from ultralytics import YOLO" in node. py without instantiating "YOLO", the speed of Ksampler increased significantly, while GPU usage dropped to around 50%
This issue exists on both my 4090 and A800, but when I commented out this line, it returned to normal
I cannot find any reason or solution
I also raised this issue in Comfyui' code repository
Environment
A800 Driver Version: 550.54.14 CUDA Version: 12.4 GTX4090 Driver Version: 535.161.08 CUDA Version: 12.2
absl-py 2.1.0 accelerate 0.32.1 addict 2.4.0 aiohttp 3.9.5 aiohttp-sse 2.2.0 aiosignal 1.3.1 albucore 0.0.13 albumentations 1.4.13 annotated-types 0.7.0 archspec 0.2.1 asttokens 2.0.5 astunparse 1.6.3 async-timeout 4.0.3 attrs 23.1.0 backcall 0.2.0 basicsr 1.4.2 beautifulsoup4 4.12.2 bitsandbytes 0.43.1 boltons 23.0.0 boto3 1.34.156 botocore 1.34.156 Brotli 1.0.9 certifi 2023.11.17 cffi 1.16.0 chardet 4.0.0 charset-normalizer 2.0.4 click 8.1.7 coloredlogs 15.0.1 conda 23.9.0 conda-build 3.28.1 conda-content-trust 0.2.0 conda_index 0.3.0 conda-libmamba-solver 23.7.0 conda-package-handling 2.2.0 conda_package_streaming 0.9.0 contourpy 1.2.1 cryptography 41.0.7 cycler 0.12.1 Cython 3.0.11 datasets 2.20.0 decorator 5.1.1 deepdiff 7.0.1 deepspeed 0.14.4 diffusers 0.30.0.dev0 dill 0.3.8 distro 1.8.0 dnspython 2.4.2 docker-pycreds 0.4.0 easydict 1.13 einops 0.8.0 eval_type_backport 0.2.0 exceptiongroup 1.0.4 executing 0.8.3 expecttest 0.1.6 filelock 3.13.1 flatbuffers 24.3.25 fonttools 4.53.1 frozenlist 1.4.1 fsspec 2023.12.2 ftfy 6.2.0 future 1.0.0 gitdb 4.0.11 GitPython 3.1.43 gmpy2 2.1.2 grpcio 1.65.0 hjson 3.1.0 huggingface-hub 0.23.4 humanfriendly 10.0 hypothesis 6.92.0 idna 3.4 imageio 2.34.2 importlib_metadata 8.0.0 insightface 0.7.3 ipython 8.15.0 jedi 0.18.1 Jinja2 3.1.2 jmespath 1.0.1 joblib 1.4.2 jsonpatch 1.32 jsonpath-ng 1.6.1 jsonpointer 2.1 jsonschema 4.19.2 jsonschema-specifications 2023.7.1 kiwisolver 1.4.5 kornia 0.7.3 kornia_rs 0.1.5 lazy_loader 0.4 libarchive-c 2.9 libmambapy 1.5.3 lmdb 1.5.1 Markdown 3.6 MarkupSafe 2.1.1 matplotlib 3.9.1.post1 matplotlib-inline 0.1.6 menuinst 2.0.1 mkl-fft 1.3.8 mkl-random 1.2.4 mkl-service 2.4.0 more-itertools 10.1.0 mpmath 1.3.0 multidict 6.0.5 multiprocess 0.70.16 networkx 3.1 ninja 1.11.1.1 numpy 1.26.2 nvidia-ml-py 12.555.43 onnx 1.16.2 onnxruntime 1.18.1 opencv-python 4.6.0.66 opencv-python-headless 4.10.0.84 ordered-set 4.1.0 packaging 23.1 pandas 2.2.2 parso 0.8.3 peft 0.7.0 pexpect 4.8.0 pickleshare 0.7.5 piexif 1.1.3 Pillow 10.0.1 pip 23.3.1 pkginfo 1.9.6 platformdirs 3.10.0 pluggy 1.0.0 ply 3.11 prettytable 3.10.2 prompt-toolkit 3.0.36 protobuf 4.25.3 psutil 5.9.0 ptyprocess 0.7.0 pure-eval 0.2.2 py-cpuinfo 9.0.0 pyarrow 16.1.0 pyarrow-hotfix 0.6 pycosat 0.6.6 pycparser 2.21 pydantic 2.8.2 pydantic_core 2.20.1 Pygments 2.15.1 pyOpenSSL 23.2.0 pyparsing 3.1.2 PySocks 1.7.1 python-dateutil 2.9.0.post0 python-etcd 0.4.5 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.30.2 regex 2024.5.15 requests 2.32.3 rpds-py 0.10.6 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.6 s3transfer 0.10.2 safetensors 0.4.3 scikit-image 0.24.0 scikit-learn 1.5.1 scipy 1.14.0 seaborn 0.13.2 sentencepiece 0.2.0 sentry-sdk 2.9.0 setproctitle 1.3.3 setuptools 68.2.2 six 1.16.0 smmap 5.0.1 sortedcontainers 2.4.0 soundfile 0.12.1 soupsieve 2.5 spandrel 0.3.4 stack-data 0.2.0 sympy 1.12 tb-nightly 2.18.0a20240807 tensorboard 2.17.0 tensorboard-data-server 0.7.2 threadpoolctl 3.5.0 tifffile 2024.7.24 tokenizers 0.19.1 tomli 2.0.1 toolz 0.12.0 torch 2.1.2 torchaudio 2.1.2 torchelastic 0.2.2 torchsde 0.2.6 torchvision 0.16.2 tqdm 4.66.4 traitlets 5.7.1 trampoline 0.1.2 transformers 4.42.3 triton 2.1.0 truststore 0.8.0 types-dataclasses 0.6.6 typing_extensions 4.12.2 tzdata 2024.1 ultralytics 8.2.74 ultralytics-thop 2.0.0 urllib3 1.26.18 wandb 0.17.4 wcwidth 0.2.13 Werkzeug 3.0.3 wheel 0.41.2 xformers 0.0.23.post1 xxhash 3.4.1 yapf 0.40.2 yarl 1.9.4 zipp 3.19.2 zstandard 0.19.0
Minimal Reproducible Example
None
Additional
None
Are you willing to submit a PR?
- [X] Yes I'd like to help by submitting a PR!