Skip to content

Commit

Permalink
[web] Don't sync CLIP emeddings in the web app (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr authored May 20, 2024
2 parents b131472 + 0877d9c commit 9c667ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
9 changes: 0 additions & 9 deletions desktop/src/main/services/dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ export const openLogDirectory = () => openDirectory(logDirectoryPath());
* "userData" directory. This is the **primary** place applications are meant to
* store user's data, e.g. various configuration files and saved state.
*
* During development, our app name is "Electron", so this'd be, for example,
* `~/Library/Application Support/Electron` if we run using `yarn dev`. For the
* packaged production app, our app name is "ente", so this would be:
*
* - Windows: `%APPDATA%\ente`, e.g. `C:\Users\<username>\AppData\Local\ente`
* - Linux: `~/.config/ente`
* - macOS: `~/Library/Application Support/ente`
*
* Note that Chromium also stores the browser state, e.g. localStorage or disk
* caches, in userData.
*
Expand All @@ -71,7 +63,6 @@ export const openLogDirectory = () => openDirectory(logDirectoryPath());
* "ente.log", it can be found at:
*
* - macOS: ~/Library/Logs/ente/ente.log (production)
* - macOS: ~/Library/Logs/Electron/ente.log (dev)
* - Linux: ~/.config/ente/logs/ente.log
* - Windows: %USERPROFILE%\AppData\Roaming\ente\logs\ente.log
*/
Expand Down
5 changes: 1 addition & 4 deletions desktop/src/main/services/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ export const clearStores = () => {
* [Note: Safe storage keys]
*
* On macOS, `safeStorage` stores our data under a Keychain entry named
* "<app-name> Safe Storage". Which resolves to:
*
* - Electron Safe Storage (dev)
* - ente Safe Storage (prod)
* "<app-name> Safe Storage". In our case, "ente Safe Storage".
*/
export const saveEncryptionKey = (encryptionKey: string) => {
const encryptedKey = safeStorage.encryptString(encryptionKey);
Expand Down
6 changes: 3 additions & 3 deletions web/apps/photos/src/pages/gallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -717,10 +717,10 @@ export default function Gallery() {
await syncTrash(collections, setTrashedFiles);
await syncEntities();
await syncMapEnabled();
await syncCLIPEmbeddings();
const electron = globalThis.electron;
if (isInternalUserForML() && electron) {
await syncFaceEmbeddings();
if (electron) {
await syncCLIPEmbeddings();
if (isInternalUserForML()) await syncFaceEmbeddings();
}
if (clipService.isPlatformSupported()) {
void clipService.scheduleImageEmbeddingExtraction();
Expand Down

0 comments on commit 9c667ef

Please sign in to comment.