Skip to content

Fix Anomalib model device placement - #187

Merged
DeepKnowledge1 merged 1 commit into
mainfrom
fix/anomalib-model-device-placement
Oct 26, 2026
Merged

DeepKnowledge1 merged 1 commit into
mainfrom
fix/anomalib-model-device-placement

Conversation

@DeepKnowledge1

Copy link
Copy Markdown
Owner

🔗 Related Issue

Fixes #

📝 Description

  • Fix Anomalib model device placement by moving the model to the input tensor’s device.
  • Ensure GPU inference uses the correct device and avoids CPU/GPU device mismatch errors.
  • No changes to core anomaly detection logic.

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation update
  • 🏗️ Infrastructure / CI/CD update

🧪 Hardware & Matrix Testing

I have successfully built and tested this code using uv on:

  • anomavision[cpu] (Standard/Edge)
  • anomavision[cu121] (CUDA 12.1)
  • anomavision[cu124] (CUDA 12.4)
  • anomavision[cu118] (CUDA 11.8)

Host OS used for testing:

  • Linux / Ubuntu
  • Windows (Native or WSL2)
  • macOS

✅ Developer Checklist

  • My code follows the core style guidelines of this project (Ruff/Black formatting).
  • I have run uv run pytest and all unit tests pass locally.
  • Lockfile Guard: If I added or modified a dependency in pyproject.toml, I have run uv lock --python 3.10 and committed the updated uv.lock file.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the documentation accordingly (if applicable).

📸 Screenshots / Visual Proof (Optional)

@DeepKnowledge1
DeepKnowledge1 merged commit fcdf07c into main Oct 26, 2026
5 checks passed
@DeepKnowledge1
DeepKnowledge1 deleted the fix/anomalib-model-device-placement branch October 26, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant