# \[SAM2\] Very slow inference speeds, even on a 3090

**URL:** <https://community.ultralytics.com/t/sam2-very-slow-inference-speeds-even-on-a-3090/445>\
**Category:** Support\
**Tags:** question\
**Created:** [October 28, 2024, 10:25am UTC](https://community.ultralytics.com/t/sam2-very-slow-inference-speeds-even-on-a-3090/445 "2024-10-28T10:25:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![divineSix](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/divinesix/32/370_2.png) [@divineSix](https://community.ultralytics.com/u/divineSix)\
**Post date:** [October 28, 2024, 10:25am UTC](https://community.ultralytics.com/t/sam2-very-slow-inference-speeds-even-on-a-3090/445/1 "2024-10-28T10:25:23Z")

</div>

Experimenting with SAM2. I have a 3090 GPU, on which the `sam2.1-hiera-large` from the original facebook repository runs at 15FPS atleast. I was exploring the ultralytics support for it, given that it would be easier to pipeline it using them, but realized that the inference is unbelievably slow. Like, I am getting 4 seconds per frame.

Verified the following things. The model is for sure loaded onto the GPU, I can see the equivalent memory footprint. Passed the `cuda:0` for the `device` argument.

---

<div class="post-metadata">

**Author:** ![BurhanQ](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/burhanq/32/7_2.png) [@BurhanQ](https://community.ultralytics.com/u/BurhanQ)\
**Post date:** [October 28, 2024, 1:42pm UTC](https://community.ultralytics.com/t/sam2-very-slow-inference-speeds-even-on-a-3090/445/2 "2024-10-28T13:42:24Z")

</div>

Which version of the Ultralytics SAM2.1 models are you using and what’s the code/command you’re using for inference?
