blakeblackshear/frigate · error · FileNotFoundError
No *_post.onnx file found in custom model zip for {self.memx
Error message
No *_post.onnx file found in custom model zip for {self.memx_model_type.name}. What it means
For model types yolonas and ssd, the MemryX post-processing runs on-device via a *_post.onnx companion model; if the extracted custom zip contains no file matching *_post.onnx, the plugin cannot set up post-processing and raises FileNotFoundError.
Source
Thrown at frigate/detectors/plugins/memryx.py:248
)
post_candidates = glob.glob(
os.path.join(custom_dir, "**", "*_post.onnx"), recursive=True
)
if not dfp_candidates:
raise FileNotFoundError(
"No .dfp file found in custom model zip after extraction."
)
self.memx_model_path = dfp_candidates[0]
# Handle post model requirements by model type
if self.memx_model_type in [
ModelTypeEnum.yolonas,
ModelTypeEnum.ssd,
]:
if not post_candidates:
raise FileNotFoundError(
f"No *_post.onnx file found in custom model zip for {self.memx_model_type.name}."
)
self.memx_post_model = post_candidates[0]
elif self.memx_model_type in [
ModelTypeEnum.yolox,
ModelTypeEnum.yologeneric,
]:
# Explicitly ignore any post model even if present
self.memx_post_model = None
else:
# Future model types can optionally use post if present
self.memx_post_model = (
post_candidates[0] if post_candidates else None
)
logger.info(f"Using custom model: {self.memx_model_path}")
return
View on GitHub (pinned to ca18b8dc13)
Solutions
- Re-create the zip including the *_post.onnx alongside the .dfp (name must match the *_post.onnx pattern)
- Or switch to a model type that does not need a post model (e.g. yolox/yologeneric handle post-processing on host)
- Regenerate the package with the MemryX export flow so both artifacts are included
Example fix
# zip layout for yolonas unzip -l custom.zip # yolonas.dfp # yolonas_post.onnx <- required
Defensive patterns
Strategy: validation
Validate before calling
import zipfile
def zip_has_post_onnx(path: str) -> bool:
with zipfile.ZipFile(path) as z:
return any(n.endswith('_post.onnx') for n in z.namelist()) Try / catch
try:
detector = MemryXDetector(config)
except FileNotFoundError as e:
if '_post.onnx' in str(e):
raise SystemExit('Add the *_post.onnx to the model zip for yolonas/ssd') from None
raise Prevention
- For yolonas/ssd always export with the on-device post model and zip it together
- Name post models with the *_post.onnx suffix
- Validate archive contents in a deploy script
When it happens
Trigger: Custom zip with model type yolonas or ssd where glob for **/*_post.onnx in the extraction dir returns empty, e.g. the user only packaged the .dfp and omitted the post-processing onnx.
Common situations: Compiling a YOLO-NAS/SSD model with MIX and forgetting to include the generated *_post.onnx; renaming the post model; using a zip built for a different model type.
Related errors
- No .dfp file found in custom model zip after extraction.
- MemryX SDK is not installed. Install it and set up MIX envir
- Invalid model path: {self.memx_model_path}. Only .zip files
- Custom model zip not found: {self.memx_model_path}
- {self.memx_model_type} is currently not supported for memryx
AI-assisted analysis of blakeblackshear/frigate@ca18b8dc13 (2026-08-27).
Data as JSON: /api/errors/1db2f164e582a021.
Report an issue: GitHub.