LrGeniusAI icon indicating copy to clipboard operation
LrGeniusAI copied to clipboard

[Bug] LRGeniusAI Datenbank Timeout

Open Der-Canonier opened this issue 8 months ago • 27 comments

What happened?

Today I reinstalled LRGeniusAI 2.12.5 (after uninstalling version 1.7) and configured it in the add-on manager as follows. I then analyzed and indexed a small folder of photos. Shortly before the process finished, a timeout occurred. Unfortunately, I can't get any further.

Environment

  • macOS 26.4
  • Lightroom 15.2.1
  • LRGeniusAI 2.12.5
  • MacBook M3 Max

Logs / screenshots

LrGeniusAI.log

Image Image

Der-Canonier avatar Apr 06 '26 14:04 Der-Canonier

Image

Der-Canonier avatar Apr 06 '26 14:04 Der-Canonier

According to the log: 2026-04-06 15:33:59.4820000+02:00, ERROR /Users/Markus/Pictures/Lightroom/Plugins-Zusatzmodule/lrgenius-server/lrgenius-server not found. Not trying to start server

The server part is missing, can you check if the file is there?

bmachek avatar Apr 06 '26 18:04 bmachek

Do I need to change anything in the plugin settings regarding the backend server URL? Or should I leave it blank?

I kind of understood that the server starts automatically?

Der-Canonier avatar Apr 06 '26 20:04 Der-Canonier

I've made some progress: the lrgenius server is now in the correct path.

When I select photos (two for the test first, then one more) and click “Analyze & Index Photos,” the dialog box appears. However, when I click Start, I get the following messages.

What am I doing wrong?

One more quick question: Does the “Analyze & Index” feature also work with Smart Previews of photos on the Synology?

LrGeniusAI.log

Image Image Image

Der-Canonier avatar Apr 07 '26 05:04 Der-Canonier

No it doesn't work with Smart Previews. At least not yet. Can you send the lrgenius-server.log as well, please. There is a button "Copy log files to desktop" in the plug-in manager.

bmachek avatar Apr 07 '26 05:04 bmachek

I just pressed the button and attached the log. However, there is no log from the server in that folder.

Image Image Image

Der-Canonier avatar Apr 07 '26 06:04 Der-Canonier

What does running

/Users/Markus/Pictures/Lightroom/Plugins-Zusatzmodule/lrgenius-server/lrgenius-server --db-path /tmp/test.db

say? Can you post a screenshot?

bmachek avatar Apr 07 '26 07:04 bmachek

What would you like to take a screenshot of? 🤔

In Finder, I don't see any changes while Lightroom is processing.

I'm also wondering where the name test.db (--db-path /tmp/test.db) comes from.

While it's processing, I see the display in Lightroom Image

Der-Canonier avatar Apr 07 '26 08:04 Der-Canonier

Sorry.. I meant:

  • Open a Terminal
  • Run: /Users/Markus/Pictures/Lightroom/Plugins-Zusatzmodule/lrgenius-server/lrgenius-server --db-path /tmp/test.db
  • Post a screenshot of the terminal output or copy the output here...

bmachek avatar Apr 07 '26 10:04 bmachek

Ah 😁

Here´s the result:

Last login: Tue Apr 7 11:14:15 on console Markus@MC-MacBook-Pro-M3-Max ~ % /Users/Markus/Pictures/Lightroom/Plugins-Zusatzmodule/lrgenius-server/lrgenius-server --db-path /tmp/test.db 2026-04-07 12:43:24,431 INFO Log file rotation on startup enabled for /tmp/lrgenius-server.log (GENIUSAI_LOG_ROTATE_BACKUPS) 2026-04-07 12:43:24,432 INFO Imported config 2026-04-07 12:43:27,742 INFO Imported server_lifecycle 2026-04-07 12:43:28,468 INFO Flask app created 2026-04-07 12:43:28,472 INFO ============================================================ 2026-04-07 12:43:28,472 INFO LrGenius Server version 2.12.5 (build 20260406) 2026-04-07 12:43:28,472 INFO LrGenius Server starting... 2026-04-07 12:43:28,472 INFO Python: 3.12.13 2026-04-07 12:43:28,472 INFO Database: /tmp/test.db 2026-04-07 12:43:28,472 INFO ============================================================ 2026-04-07 12:43:28,472 INFO DB backup scheduler disabled (GENIUSAI_BACKUP_ENABLED not set). 2026-04-07 12:43:28,472 INFO Faces cluster scheduler disabled (GENIUSAI_FACES_CLUSTER_ENABLED not set). 2026-04-07 12:43:28,472 INFO Starting production server on http://127.0.0.1:19819 2026-04-07 12:43:28,474 INFO Serving on http://127.0.0.1:19819

Der-Canonier avatar Apr 07 '26 10:04 Der-Canonier

Ok. Backend is starting without security warnings that's good. Now in the folder where your Lightroom catalog is located, there is a file called lrgenius-server.log. This should finally give the missing hint why Analyze & Index fails. Could please post that as well?

bmachek avatar Apr 07 '26 19:04 bmachek

Good Morning,

Well, I'll keep my fingers crossed that you find the clue in the log.

lrgenius-server.log

Der-Canonier avatar Apr 08 '26 05:04 Der-Canonier

Easy one ;-) CLIP model isn't downloaded yet. Either go to plugin manager and hit download CLIP model. (Model is about ~4GB, so the download takes a while. Progress of the download isn't reported to Lightroom yet, only when download completes it is reported. Or if you don't want to use Semantic search or download the model disable Generate image embeddings in the Analyze & Index dialog.

Error handling / reporting still needs to be improved

bmachek avatar Apr 08 '26 06:04 bmachek

Well, I hope it works after that. Did I miss the part about having to download the clip template?

Der-Canonier avatar Apr 08 '26 06:04 Der-Canonier

Yes, it's not that well documented yet. Also by "Error handling / reporting still needs to be improved" I meant, the plugin should report an error that the CLIP model is missing instead of just failing. So much work... 😄

bmachek avatar Apr 08 '26 06:04 bmachek

You're the one who wanted it that way—luckily. 😝

I've started the download; let's see when it finishes.

Der-Canonier avatar Apr 08 '26 07:04 Der-Canonier

Where exactly are the 4 GB stored so I can check whether anything is happening at all or if the model has been downloaded?

Image

Der-Canonier avatar Apr 08 '26 09:04 Der-Canonier

If the checkbox OpenCLIP AI model is ready is checked, like in the screenshot, you're good to go.

Model files are located in: ~/.cache/huggingface/hub/models--timm--ViT-SO400M-16-SigLIP2-384

bmachek avatar Apr 08 '26 14:04 bmachek

Hm,

Hmm, it looks like there's another error. The checkbox for OpenCLIP AI is checked, but I'm still getting the same error message when indexing. Image

Just to be safe, here's the server log again lrgenius-server.log

These 3 folders are located in that directory Image

I´m so sorry 🙈

Der-Canonier avatar Apr 08 '26 15:04 Der-Canonier

No need to apologize. 😄

Is Use Lightroom keyword structure active? Do you happen to have a very complex structure in your catalog?

bmachek avatar Apr 08 '26 16:04 bmachek