Skip to content

Commit e3b2f31

Browse files
committed
Fix bugs when switching control layer type. This logic still feels very hacky.
1 parent 4dfa480 commit e3b2f31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ export const canvasSlice = createSlice({
493493

494494
case 'control_lora': {
495495
if (layer.controlAdapter.type === 'controlnet') {
496-
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, ...initialControlLoRA };
496+
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, type: 'control_lora' };
497497
layer.controlAdapter = controlLoraConfig;
498498
} else if (layer.controlAdapter.type === 't2i_adapter') {
499-
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, ...initialControlLoRA };
499+
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, type: 'control_lora' };
500500
layer.controlAdapter = controlLoraConfig;
501501
}
502502
break;

0 commit comments

Comments
 (0)