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(webv2): require both experts installed before offering the swap

Lincoln Stein90cf0dbe8726
diff --git a/invokeai/frontend/webv2/src/features/video/ui/VideoComponentsSection.tsx b/invokeai/frontend/webv2/src/features/video/ui/VideoComponentsSection.tsx
index 1dd136ec88..a21210fdb5 100644
--- a/invokeai/frontend/webv2/src/features/video/ui/VideoComponentsSection.tsx
+++ b/invokeai/frontend/webv2/src/features/video/ui/VideoComponentsSection.tsx
@@ -123,17 +123,23 @@ const WanExpertWiringNotice = memo(function WanExpertWiringNotice({
[values.model, values.wanLowNoiseModel]
);
// Only offer the swap when exchanging roles actually clears the warning: a
- // high+high or low+low pair would just re-warn about the other file.
+ // high+high or low+low pair would just re-warn about the other file. Both
+ // configs must also still exist in the catalog — "models loaded" alone
+ // would happily relocate a just-uninstalled config into the main slot.
+ const bothExpertsInstalled =
+ Boolean(values.model && models.some((candidate) => candidate.key === values.model?.key)) &&
+ Boolean(values.wanLowNoiseModel && models.some((candidate) => candidate.key === values.wanLowNoiseModel?.key));
const swapResolves =
warning !== null &&
warning.kind !== 'single-low' &&
+ bothExpertsInstalled &&
values.wanLowNoiseModel?.format !== 'diffusers' &&
getWanExpertWiringWarning(values.wanLowNoiseModel, values.model) === null;
const swapExperts = useCallback(() => {
const previousMain = values.model;
const nextMain = values.wanLowNoiseModel;
- if (!previousMain || !nextMain) {
+ if (!previousMain || !nextMain || !models.some((candidate) => candidate.key === nextMain.key)) {
return;
}