mirror of
https://github.com/ultralytics/ultralytics
synced 2026-04-21 22:17:16 +00:00
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
20 lines
818 B
Markdown
20 lines
818 B
Markdown
---
|
|
description: Learn how Ultralytics uses lazy imports with __getattr__ to speed up package startup and load model classes like YOLO, NAS, RTDETR, and SAM only when needed.
|
|
keywords: Ultralytics, YOLO, lazy import, __getattr__, NAS, RTDETR, SAM, FastSAM, YOLOWorld, performance, startup time, optimization
|
|
---
|
|
|
|
# Reference for `ultralytics/__init__.py`
|
|
|
|
!!! success "Improvements"
|
|
|
|
This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/\_\_init\_\_.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/__init__.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing/) — thank you! 🙏
|
|
|
|
<br>
|
|
|
|
## ::: ultralytics.__init__.__getattr__
|
|
|
|
<br><br><hr><br>
|
|
|
|
## ::: ultralytics.__init__.__dir__
|
|
|
|
<br><br>
|