skills/transformation/depth-estimation falls through to a dependency the macOS deploy path deliberately excludes
Same bug class as #208 (YOLO detection): the accelerated-backend fallback chain has no path for "installed correctly, but the accelerated backend is unavailable here" — it eventually falls through to a dependency (torch) that the lightweight macOS deploy.sh path deliberately does not install.
Repro
Clean venv matching deploy.sh's macOS branch: coremltools 9.0, huggingface_hub, numpy 2.5.3, opencv-python-headless, Pillow, matplotlib — no onnxruntime/torch/depth-anything-v2.
Forced a CoreML load failure without touching the repo (pointed MODELS_DIR at a throwaway temp dir, no-op'd the HF download). The full fallback chain fires as designed, then dies unguarded:
CoreML load failed → falling back to PyTorch
ONNX Runtime load failed (No module named 'onnxruntime') → trying TensorRT
TensorRT unavailable (No module named 'torch') → falling back to PyTorch
File ".../depth-estimation/scripts/transform.py", line 464, in _load_pytorch
import torch
ModuleNotFoundError: No module named 'torch'
The final fallback call (_load_pytorch) is unguarded — no try/except — so this ModuleNotFoundError propagates straight to the caller instead of a clean "no usable backend" error.
Secondary note
deploy.sh's macOS branch has no numpy<2.0 cap, unlike requirements_mps.txt for the YOLO skill (which pins numpy>=1.24.0,<2.0.0). Worth checking whether that's intentional or a consistency gap between the two skills' deploy paths.
Same fix shape as #208 likely applies here too: don't let the fallback chain reach torch on a deploy path that never installs it — fail with a clear "no accelerated backend available" message instead, or check framework_ok-equivalent before attempting the torch import.
🤖 Generated with Claude Code
skills/transformation/depth-estimationfalls through to a dependency the macOS deploy path deliberately excludesSame bug class as #208 (YOLO detection): the accelerated-backend fallback chain has no path for "installed correctly, but the accelerated backend is unavailable here" — it eventually falls through to a dependency (
torch) that the lightweight macOSdeploy.shpath deliberately does not install.Repro
Clean venv matching
deploy.sh's macOS branch:coremltools 9.0,huggingface_hub,numpy 2.5.3,opencv-python-headless,Pillow,matplotlib— noonnxruntime/torch/depth-anything-v2.Forced a CoreML load failure without touching the repo (pointed
MODELS_DIRat a throwaway temp dir, no-op'd the HF download). The full fallback chain fires as designed, then dies unguarded:The final fallback call (
_load_pytorch) is unguarded — no try/except — so thisModuleNotFoundErrorpropagates straight to the caller instead of a clean "no usable backend" error.Secondary note
deploy.sh's macOS branch has nonumpy<2.0cap, unlikerequirements_mps.txtfor the YOLO skill (which pinsnumpy>=1.24.0,<2.0.0). Worth checking whether that's intentional or a consistency gap between the two skills' deploy paths.Same fix shape as #208 likely applies here too: don't let the fallback chain reach
torchon a deploy path that never installs it — fail with a clear "no accelerated backend available" message instead, or checkframework_ok-equivalent before attempting thetorchimport.🤖 Generated with Claude Code