From cae82274da77b1069106a3a16617d67b3f6718ba Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 26 Aug 2025 20:23:08 +0200 Subject: [PATCH 1/5] Refactor code for speed and clarity --- .github/workflows/push.yml | 2 +- README.md | 2 +- yoloe11s/predict.py | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 407e5b1..81eb2ee 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - model: [yolo11n,yolov8s-worldv2,yoloe11s] + model: [yolo11n, yolov8s-worldv2, yoloe11s] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/README.md b/README.md index 9c19d32..baf3599 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ cog push r8.im/ultralytics/yolo11n 1. **Setup secrets:** - Go to repository Settings → Secrets → Actions - - Add `REPLICATE_API_TOKEN` with your [Replicate API token](https://replicate.com/auth/token) + - Add `REPLICATE_API_TOKEN` with your [Replicate API token](https://replicate.com/signin?next=/auth/token) 2. **Deploy:** - **Manual**: Actions tab → "Push YOLO11n to Replicate" → Run workflow diff --git a/yoloe11s/predict.py b/yoloe11s/predict.py index 20df8d2..85c2532 100644 --- a/yoloe11s/predict.py +++ b/yoloe11s/predict.py @@ -22,13 +22,14 @@ def setup(self) -> None: def re_init_model(self, class_names: str) -> None: """Re-Initialize model with class names.""" - if class_names.strip() != "": + if not class_names.strip(): + # Load YOLOE-11s model prompt free model into memory + self.model = YOLOE("yoloe-11s-seg-pf.pt") + + else: self.model = YOLOE("yoloe-11s-seg.pt") class_list = class_names.split(", ") self.model.set_classes(class_list, self.model.get_text_pe(class_list)) - else: - # Load YOLOE-11s model prompt free model into memory - self.model = YOLOE("yoloe-11s-seg-pf.pt") def predict( self, From c5bcda4e2ad53c72504f273f4640d6e1a02a726a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 26 Aug 2025 20:24:37 +0200 Subject: [PATCH 2/5] Update README.md Signed-off-by: Glenn Jocher --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index baf3599..9c19d32 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ cog push r8.im/ultralytics/yolo11n 1. **Setup secrets:** - Go to repository Settings → Secrets → Actions - - Add `REPLICATE_API_TOKEN` with your [Replicate API token](https://replicate.com/signin?next=/auth/token) + - Add `REPLICATE_API_TOKEN` with your [Replicate API token](https://replicate.com/auth/token) 2. **Deploy:** - **Manual**: Actions tab → "Push YOLO11n to Replicate" → Run workflow From 1c07b04bc48ae56cf5b70e9980008ee4b3df0095 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 26 Aug 2025 20:42:25 +0200 Subject: [PATCH 3/5] Update cog.yaml Signed-off-by: Glenn Jocher --- yoloe11s/cog.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/yoloe11s/cog.yaml b/yoloe11s/cog.yaml index 38d4dc6..beda2c8 100644 --- a/yoloe11s/cog.yaml +++ b/yoloe11s/cog.yaml @@ -4,7 +4,6 @@ build: gpu: false python_version: "3.12" system_packages: - - "libgl1-mesa-glx" - "libglib2.0-0" - "ffmpeg" python_packages: From 3a8ce325e8b8b870ac20625e294b565bb5f526ef Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 26 Aug 2025 20:44:26 +0200 Subject: [PATCH 4/5] Update cog.yaml Signed-off-by: Glenn Jocher --- yolov8s-worldv2/cog.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/yolov8s-worldv2/cog.yaml b/yolov8s-worldv2/cog.yaml index f01edbf..41a67a4 100644 --- a/yolov8s-worldv2/cog.yaml +++ b/yolov8s-worldv2/cog.yaml @@ -4,7 +4,6 @@ build: gpu: false python_version: "3.12" system_packages: - - "libgl1-mesa-glx" - "libglib2.0-0" - "ffmpeg" python_packages: From d986b0e73eb9b77cca6fd7a3bd4f09ce2beb31f5 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 26 Aug 2025 20:46:06 +0200 Subject: [PATCH 5/5] Update cog.yaml Signed-off-by: Glenn Jocher --- yolo11n/cog.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/yolo11n/cog.yaml b/yolo11n/cog.yaml index 8b5fd54..caec2c9 100644 --- a/yolo11n/cog.yaml +++ b/yolo11n/cog.yaml @@ -4,7 +4,6 @@ build: gpu: false python_version: "3.12" system_packages: - - "libgl1-mesa-glx" - "libglib2.0-0" - "ffmpeg" python_packages: