As a computer scientist, I've made tremendous progress using AI to write code, books, and build live systems. So when I encountered another stalled Lightroom Classic import, I thought, it's time to bring AI to bear on it.
At first I didn't have high hopes. My catalog got wedged in the infamous 13.3 syncpolalypse and never really recovered. Several attempts to have Adobe fix it conjured remote technicians popping in and messing up. One of them tried to reimport the data into a new catalog that would have replaced the 850K one I've assembled in the cloud since the inception of Lr Mobile. I am one of the earliest adopters of Lightroom, since 2007 Beta at Peter Krogh's DAM workshop. Peter was an advisor to Adobe, crucially adding DNG Validate to it.
And then Fable 5.1 started doing miracles. It traced most of the stalling to broken Lua and bad indices in the underlying SQLite. It added the indices, and it sped things up dramatically. It used oracles, making Lightroom process files under different settings and observing results, to figure out exactly what Lightroom is doing when the code was not available. It decompiled Lua bytecode to watch what it's doing. This was the major revelation: you don't need to guess what the C++ binary is doing! Most sync code is Lua. The fixes ended up as scripts, and it turned out there's a hidden Scripts menu you can enable to run them. Lightroom drops any schema elements, such as indices, that it doesn't know about, from the catalog upon restart, so we had to recreate them repeatedly. It is now done by a Lightroom Watcher app that I have running under launchd. It uses the Scripts menu to run multiple fixes to the SQLite indices.
Two years later, I've been using a new Photo Mechanic/SmugMug workflow to upload. Now I can finally use my Lightroom Classic for fast imports and sync. QI also helped me to create all the sync collections. I even figured out how to reuse Lightroom Classic and Cloud smart previews using APFS cloning, so the 700GB of smart previews are shared between them efficiently. Claude can always help me diagnose a stalled import, a duplicate, or JPG vs DNG. We've reconciled multiple fragmented lrmobile trees left after moving machines, and reinserted them in the catalog. We've reviewed terabytes of DNGs that differed only in metadata and created a metadata-only store that can reproduce them in any state from the same pixels.
My previous posts proposed regenerating smart previews with the DNG Converter at high speed, and Claude did just that, after using an oracle to figure out the exact settings to make byte-identical files to what Lightroom itself does. It can feed work via LrC itself or do it in the background and register it, supplying the exact metadata it needs, and inspecting items stuck in queues, seeing what workers are doing to dislodge obstacles, etc. Years of guessing and rumours can now be dispelled by a few minutes of focused experiments. Computer use allows Claude or Codex to click on UI elements and drive the workflows directly. In my case, Codex built bespoke plugins and installed them to figure out various inner workings of Lr and build previews faster around the stalled main route when we started out. If you know what to ask and how to monitor and evaluate the results, you can now fix any wedged Lightroom setup on your own! I'll relay the full operational log to Adobe so it can improve Lightroom for all of us.
This is not strictly a plugin, but a set of tools to help you fix your Lightroom Classic setup by adding indices to the SQLite catalog and observe what it is doing. The HOWTOs show how to add Scripts menu items to do this, and run a helper app that will do this upon every Lightroom Classic restart as it drops the indices it doesn't know about. This allows us to use the official Lightroom app as is.
The DNG Compare is a sister project used to compare large sets of DNGs, extracting only the metadata differences, and archiving them. That helps if you have multiple copies of your DNG trees and some got updated via Lightroom Classic catalog sync. The files would compare as different with regular OS diff tools. DNG Compare does a deep comparison similar to the DNG Validate menu item pioneered by Peter Krogh. It ensures the raw data is the same, byte for byte, pixel by pixel, and identifies which XMP fields and other metadata have changed. You can then delete one of the DNG trees, and if you realize you needed some metadata field from a deleted file, you can look it up and reproduce that file verbatim later.
TODO
There are more tools in the works, specifically reusing Smart Previews created by Lightroom Classic as the cache of Lightroom Cloud/CC/Desktop (whatever you call the non-classic one), so editing becomes available offline in both. Since the changes are recorded only in the respective apps' catalogs, there's no need to duplicate the Smart Previews pixels.
HOWTOs:
https://firstpair.org/books/lightroom-repair/
https://firstpair.org/books/dng-compare/
Blog posts:
https://firstpair.press/lightroom-repair/
https://firstpair.press/dng-compare/
Open-source on Github:
https://github.com/firstpair/lightroom
https://github.com/firstpair/dng-compare
Github:
https://github.com/firstpair/lightroom
https://github.com/firstpair/dng-compare
At first I didn't have high hopes. My catalog got wedged in the infamous 13.3 syncpolalypse and never really recovered. Several attempts to have Adobe fix it conjured remote technicians popping in and messing up. One of them tried to reimport the data into a new catalog that would have replaced the 850K one I've assembled in the cloud since the inception of Lr Mobile. I am one of the earliest adopters of Lightroom, since 2007 Beta at Peter Krogh's DAM workshop. Peter was an advisor to Adobe, crucially adding DNG Validate to it.
And then Fable 5.1 started doing miracles. It traced most of the stalling to broken Lua and bad indices in the underlying SQLite. It added the indices, and it sped things up dramatically. It used oracles, making Lightroom process files under different settings and observing results, to figure out exactly what Lightroom is doing when the code was not available. It decompiled Lua bytecode to watch what it's doing. This was the major revelation: you don't need to guess what the C++ binary is doing! Most sync code is Lua. The fixes ended up as scripts, and it turned out there's a hidden Scripts menu you can enable to run them. Lightroom drops any schema elements, such as indices, that it doesn't know about, from the catalog upon restart, so we had to recreate them repeatedly. It is now done by a Lightroom Watcher app that I have running under launchd. It uses the Scripts menu to run multiple fixes to the SQLite indices.
Two years later, I've been using a new Photo Mechanic/SmugMug workflow to upload. Now I can finally use my Lightroom Classic for fast imports and sync. QI also helped me to create all the sync collections. I even figured out how to reuse Lightroom Classic and Cloud smart previews using APFS cloning, so the 700GB of smart previews are shared between them efficiently. Claude can always help me diagnose a stalled import, a duplicate, or JPG vs DNG. We've reconciled multiple fragmented lrmobile trees left after moving machines, and reinserted them in the catalog. We've reviewed terabytes of DNGs that differed only in metadata and created a metadata-only store that can reproduce them in any state from the same pixels.
My previous posts proposed regenerating smart previews with the DNG Converter at high speed, and Claude did just that, after using an oracle to figure out the exact settings to make byte-identical files to what Lightroom itself does. It can feed work via LrC itself or do it in the background and register it, supplying the exact metadata it needs, and inspecting items stuck in queues, seeing what workers are doing to dislodge obstacles, etc. Years of guessing and rumours can now be dispelled by a few minutes of focused experiments. Computer use allows Claude or Codex to click on UI elements and drive the workflows directly. In my case, Codex built bespoke plugins and installed them to figure out various inner workings of Lr and build previews faster around the stalled main route when we started out. If you know what to ask and how to monitor and evaluate the results, you can now fix any wedged Lightroom setup on your own! I'll relay the full operational log to Adobe so it can improve Lightroom for all of us.
This is not strictly a plugin, but a set of tools to help you fix your Lightroom Classic setup by adding indices to the SQLite catalog and observe what it is doing. The HOWTOs show how to add Scripts menu items to do this, and run a helper app that will do this upon every Lightroom Classic restart as it drops the indices it doesn't know about. This allows us to use the official Lightroom app as is.
The DNG Compare is a sister project used to compare large sets of DNGs, extracting only the metadata differences, and archiving them. That helps if you have multiple copies of your DNG trees and some got updated via Lightroom Classic catalog sync. The files would compare as different with regular OS diff tools. DNG Compare does a deep comparison similar to the DNG Validate menu item pioneered by Peter Krogh. It ensures the raw data is the same, byte for byte, pixel by pixel, and identifies which XMP fields and other metadata have changed. You can then delete one of the DNG trees, and if you realize you needed some metadata field from a deleted file, you can look it up and reproduce that file verbatim later.
TODO
There are more tools in the works, specifically reusing Smart Previews created by Lightroom Classic as the cache of Lightroom Cloud/CC/Desktop (whatever you call the non-classic one), so editing becomes available offline in both. Since the changes are recorded only in the respective apps' catalogs, there's no need to duplicate the Smart Previews pixels.
HOWTOs:
https://firstpair.org/books/lightroom-repair/
https://firstpair.org/books/dng-compare/
Blog posts:
https://firstpair.press/lightroom-repair/
https://firstpair.press/dng-compare/
Open-source on Github:
https://github.com/firstpair/lightroom
https://github.com/firstpair/dng-compare
Github:
https://github.com/firstpair/lightroom
https://github.com/firstpair/dng-compare
