Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
InferencePipeline
✓ from inference_models import InferencePipeline
✗ from inference_models.pipeline import InferencePipeline
InferencePipeline is exposed at package level; submodule import may break.
load_model
✓ from inference_models import load_model
✗ import inference_models.load_model
load_model is a function, not a module.
Load a model and run inference on an image.
import os
from inference_models import InferencePipeline, load_model
# Replace with your model path or Hugging Face ID
model = load_model('facebook/detr-resnet-50')
# Create pipeline
pipeline = InferencePipeline(model)
# Run inference
image_path = 'path/to/image.jpg'
results = pipeline(image_path)
print(results)
Debug
Known issues
breakingIn version 0.20.0, the 'inference' top-level module was renamed to 'inference_models'. Old imports like 'import inference' will fail.fixUse 'from inference_models import ...' instead.
affects: >=0.20.0
deprecatedThe function 'run_inference()' is deprecated since 0.25.0 and will be removed in 0.30.0. Use 'InferencePipeline' instead.fixReplace with: pipeline = InferencePipeline(model); results = pipeline(image)
affects: >=0.25.0, <0.30.0
gotchaThe library requires Python >=3.10 and <3.13. It does not support Python 3.9 or earlier, and will not install on Python 3.13+.fixEnsure your Python version is 3.10, 3.11, or 3.12.
affects: all
Upgrade
Version history
0.27.2latest on PyPI · released Apr 24, 2026
Audit
Dependencies
torchrequiredRequired for model inference
PillowrequiredImage loading and preprocessing
numpyrequiredArray operations