Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(create): Reset to model defaults switches the LoRA stack off

purplea8e63d9c0ec5
diff --git a/src/stores/__tests__/lora-strength-je-lora.test.ts b/src/stores/__tests__/lora-strength-je-lora.test.ts
index 694d18fb..69620977 100644
--- a/src/stores/__tests__/lora-strength-je-lora.test.ts
+++ b/src/stores/__tests__/lora-strength-je-lora.test.ts
@@ -99,3 +99,31 @@ describe('one value per LoRA', () => {
expect(saved.loraStrengths).toEqual({ [A]: -2 })
})
})
+
+// The box, 03.10.2026: "Reset to model defaults" left a LoRA from an earlier
+// session switched on (only Clear removed it), so the run after a reset was
+// not the model's own picture. Reset switches the stack off like Clear does.
+// The strength each LoRA was left at stays remembered.
+describe('Reset to model defaults and the LoRA stack', () => {
+ it('switches the stack off and keeps the remembered strength', () => {
+ useCreateStore.setState({ selectedLoras: [], loraStrengths: {}, selectedCharacter: null } as never)
+ const s = useCreateStore.getState()
+ s.toggleLora('char_lukompass_zimage.safetensors')
+ s.setLoraStrengthFor('char_lukompass_zimage.safetensors', 1.33)
+ useCreateStore.getState().resetParamsToModelDefaults()
+ expect(useCreateStore.getState().selectedLoras).toEqual([])
+ expect(useCreateStore.getState().loraStrengths['char_lukompass_zimage.safetensors']).toBe(1.33)
+ useCreateStore.getState().toggleLora('char_lukompass_zimage.safetensors')
+ expect(useCreateStore.getState().selectedLoras).toEqual([{ name: 'char_lukompass_zimage.safetensors', strength: 1.33 }])
+ })
+
+ it('takes the local character that rode on a LoRA with it, like Clear', () => {
+ useCreateStore.setState({
+ selectedLoras: [{ name: 'char_probe.safetensors', strength: 1 }],
+ selectedCharacter: { id: 'local:char_probe.safetensors', name: 'probe' },
+ } as never)
+ useCreateStore.getState().resetParamsToModelDefaults()
+ expect(useCreateStore.getState().selectedLoras).toEqual([])
+ expect(useCreateStore.getState().selectedCharacter).toBeNull()
+ })
+})
diff --git a/src/stores/createStore.ts b/src/stores/createStore.ts
index 4c5f3c97..64ba7085 100644
--- a/src/stores/createStore.ts
+++ b/src/stores/createStore.ts
@@ -1134,6 +1134,11 @@ export const useCreateStore = create<CreateState>()(
hiresUpscaleMethod: 'nearest-exact',
...(d.frames ? { frames: d.frames } : {}),
...(d.fps ? { fps: d.fps } : {}),
+ // A model's defaults carry no LoRA, so the stack goes off like with
+ // Clear (and the local character that rode on it). The strength each
+ // LoRA was left at stays in loraStrengths for the next time.
+ selectedLoras: [],
+ selectedCharacter: s.selectedCharacter?.id.startsWith('local:') ? null : s.selectedCharacter,
})
},