blakeblackshear/frigate · error · FileNotFoundError
No .dfp file found in custom model zip after extraction.
Error message
No .dfp file found in custom model zip after extraction.
What it means
After extracting the custom model zip, no *.dfp (MemryX compiled graph) file was found anywhere under the extraction directory. The zip is therefore not a valid MemryX model package; FileNotFoundError is raised during check_and_prepare_model in __init__.
Source
Thrown at frigate/detectors/plugins/memryx.py:236
)
if os.path.isdir(custom_dir):
shutil.rmtree(custom_dir)
os.makedirs(custom_dir, exist_ok=True)
with zipfile.ZipFile(self.memx_model_path, "r") as zip_ref:
zip_ref.extractall(custom_dir)
logger.info(f"Custom model extracted to {custom_dir}.")
# Find .dfp and optional *_post.onnx recursively
dfp_candidates = glob.glob(
os.path.join(custom_dir, "**", "*.dfp"), recursive=True
)
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,View on GitHub (pinned to ca18b8dc13)
Solutions
- Re-zip the package ensuring it directly contains the .dfp file (correct extension) at some level inside the archive
- If you only have an .onnx, compile it with MemryX tools (MIX/npu compiler) to produce a .dfp first
- Verify archive contents: unzip -l model.zip should show a .dfp entry
Example fix
# verify contents before configuring unzip -l /models/custom.zip # must include e.g. yolov6s.dfp (and yolov6s_post.onnx if required)
Defensive patterns
Strategy: validation
Validate before calling
import zipfile
def zip_has_dfp(path: str) -> bool:
with zipfile.ZipFile(path) as z:
return any(n.endswith('.dfp') for n in z.namelist()) Try / catch
try:
detector = MemryXDetector(config)
except FileNotFoundError as e:
if 'No .dfp file' in str(e):
raise SystemExit('Zip lacks a .dfp; recompile with MemryX tools') from None
raise Prevention
- Verify zip contents with unzip -l before deploying
- Compile models to .dfp with MemryX MIX tools, do not ship raw onnx
- Standardize a packaging script that always includes the .dfp
When it happens
Trigger: Providing a .zip that contains onnx/tflite files or the dfp nested under an unexpected extension/renamed file, so glob for **/*.dfp returns nothing after extraction.
Common situations: User zips the wrong folder (source weights instead of compiled package); downloaded a generic onnx zip from model zoo; .dfp renamed or double-extension (model.dfp.bin) so the glob misses it.
Related errors
- No *_post.onnx file found in custom model zip for {self.memx
- 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/57369d29c658fad3.
Report an issue: GitHub.