Skip to content

Commit 80d7d69

Browse files
psychedelicioushipsterusername
authored andcommitted
fix(ui): recall LoRAs may create duplicates
Closes #7004
1 parent 1010c98 commit 80d7d69

File tree

1 file changed

+1
-0
lines changed
  • invokeai/frontend/web/src/features/controlLayers/store

1 file changed

+1
-0
lines changed

invokeai/frontend/web/src/features/controlLayers/store/lorasSlice.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const lorasSlice = createSlice({
3737
},
3838
loraRecalled: (state, action: PayloadAction<{ lora: LoRA }>) => {
3939
const { lora } = action.payload;
40+
state.loras = state.loras.filter((l) => l.model.key !== lora.model.key && l.id !== lora.id);
4041
state.loras.push(lora);
4142
},
4243
loraDeleted: (state, action: PayloadAction<{ id: string }>) => {

0 commit comments

Comments
 (0)