Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(image-map): take the primary phrase from the richer cluster label

Lincoln Stein6764cf5f47fc
diff --git a/invokeai/frontend/webv2/src/workbench/widgets/image-map/ImageMapPlot.tsx b/invokeai/frontend/webv2/src/workbench/widgets/image-map/ImageMapPlot.tsx
index fe96925f04..1bccced26d 100644
--- a/invokeai/frontend/webv2/src/workbench/widgets/image-map/ImageMapPlot.tsx
+++ b/invokeai/frontend/webv2/src/workbench/widgets/image-map/ImageMapPlot.tsx
@@ -475,9 +475,11 @@ const ImageMapPlot = ({
const clicked = points.find((point) => point.imageName === imageName);
// The backend's cluster label names the filter chip when one has
// arrived; the member count is the fallback (labels can be off,
- // still loading, or missing for this cluster).
+ // still loading, or missing for this cluster). Only the primary
+ // phrase is used — the alternates belong to the hover card, which
+ // has room to show them.
const label =
- (clicked ? clusterLabelsRef.current?.[String(clicked.cluster)] : undefined) ??
+ (clicked ? clusterLabelsRef.current?.[String(clicked.cluster)]?.label : undefined) ??
`${clusterNames.length} images`;
selectCluster(imageName, clusterNames, label);