From a98688bd578b886ecb89b428768c1ac0c88f30a0 Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Sat, 20 Dec 2025 10:21:01 -0800 Subject: [PATCH] photoprism: fix model linking Photoprism expects models to appear under $PHOTOPRISM_ASSETS_PATH/models/* and not just $PHOTOPRISM_ASSETS_PATH/*. Without this change models like facenet won't actually be loaded, and the following error will show up in logs: ``` vision: Could not find SavedModel .pb or .pbtxt at supplied export directory path: /nix/store/...-photoprism-251130-b3068414c/share/photoprism/models/facenet. Check that the directory exists and that you have the right permissions for accessing it. (init ) ``` --- pkgs/by-name/ph/photoprism/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ph/photoprism/package.nix b/pkgs/by-name/ph/photoprism/package.nix index 4322acdc6896..d2f553938735 100644 --- a/pkgs/by-name/ph/photoprism/package.nix +++ b/pkgs/by-name/ph/photoprism/package.nix @@ -84,10 +84,14 @@ stdenv.mkDerivation (finalAttrs: { # install frontend ln -s ${frontend}/assets/* ${assets_path} + rm ${assets_path}/models + mkdir -p ${assets_path}/models + ln -s ${frontend}/assets/models/* ${assets_path}/models/ + # install tensorflow models - ln -s ${nasnet}/nasnet ${assets_path} - ln -s ${nsfw}/nsfw ${assets_path} - ln -s ${facenet}/facenet ${assets_path} + ln -s ${nasnet}/nasnet ${assets_path}/models/ + ln -s ${nsfw}/nsfw ${assets_path}/models/ + ln -s ${facenet}/facenet ${assets_path}/models/ runHook postInstall '';