From 76b5ee354d9f692de9a1751bec290a809b541211 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 2 Jul 2026 01:23:15 +0000 Subject: [PATCH] Merge diffusion-sdxl into diffusion-lora-ux; keep options-only LoRA catch The catalog-refresh .catch from the lower branch clears the selected adapters too, which is right for its catalog-only picker but wrong here: this picker holds free-text HF repo ids that are valid without being in the catalog, so a transient refresh failure must not wipe them. Family swaps still clear the selection and hidden LoRAs are never sent. --- studio/frontend/src/features/images/images-page.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx index 2f31492122..d71c35e37d 100644 --- a/studio/frontend/src/features/images/images-page.tsx +++ b/studio/frontend/src/features/images/images-page.tsx @@ -1015,12 +1015,13 @@ export function ImagesPage({ active = true }: { active?: boolean }) { if (!cancelled) setAvailableLoras(list); }) .catch(() => { - if (cancelled) return; - // Clear the SELECTED adapters too, not just the options: leaving a stale `loras` - // selection in state (with the picker now hidden/empty) would still be posted by - // handleGenerate and could apply adapters from the previous model, or fail. - setAvailableLoras([]); - setLoras([]); + // Clear only the OPTIONS on a failed catalog refresh. Unlike the catalog-only + // picker below the stack, this free-text picker holds selections (bare HF repo + // ids) that are valid without being in the catalog; a transient refresh failure + // must not wipe them. Stale cross-family selections are already cleared by the + // family-swap check above, and hidden LoRAs are never sent (handleGenerate is + // gated on loraCapable). + if (!cancelled) setAvailableLoras([]); }); return () => { cancelled = true;