Add tag cloud feature with k-means clustering and CUDA support

Introduces an Explore view with a tag cloud that clusters image embeddings
using cosine k-means and labels clusters via vocabulary-nearest-neighbour
CLIP matching. Vocabulary embeddings are disk-cached (FNV hash-keyed) to
avoid redundant inference. Enables CUDA for candle dependencies and adds a
build.rs check that surfaces a clear error when the toolkit is missing.
This commit is contained in:
2026-04-06 12:43:44 +01:00
parent 35c1dafd65
commit 6c3fd449ce
11 changed files with 1248 additions and 37 deletions
+14 -3
View File
@@ -5,12 +5,14 @@ import { BackgroundTasks } from "./components/BackgroundTasks";
import { Toolbar } from "./components/Toolbar";
import { Gallery } from "./components/Gallery";
import { Lightbox } from "./components/Lightbox";
import { TagCloud } from "./components/TagCloud";
export default function App() {
const loadFolders = useGalleryStore((state) => state.loadFolders);
const loadBackgroundJobProgress = useGalleryStore((state) => state.loadBackgroundJobProgress);
const loadImages = useGalleryStore((state) => state.loadImages);
const subscribeToProgress = useGalleryStore((state) => state.subscribeToProgress);
const activeView = useGalleryStore((state) => state.activeView);
useEffect(() => {
loadFolders().then(() => {
@@ -30,9 +32,18 @@ export default function App() {
<div className="flex h-screen bg-gray-950 text-white overflow-hidden select-none">
<Sidebar />
<main className="flex-1 flex flex-col min-w-0">
<Toolbar />
<BackgroundTasks />
<Gallery />
{activeView === "explore" ? (
<>
<BackgroundTasks />
<TagCloud />
</>
) : (
<>
<Toolbar />
<BackgroundTasks />
<Gallery />
</>
)}
</main>
<Lightbox />
</div>