Skip to content

Commit

Permalink
Fix bugs when switching control layer type. This logic still feels ve…
Browse files Browse the repository at this point in the history
…ry hacky.
  • Loading branch information
RyanJDick committed Dec 17, 2024
1 parent 4dfa480 commit e3b2f31
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ export const canvasSlice = createSlice({

case 'control_lora': {
if (layer.controlAdapter.type === 'controlnet') {
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, ...initialControlLoRA };
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, type: 'control_lora' };
layer.controlAdapter = controlLoraConfig;
} else if (layer.controlAdapter.type === 't2i_adapter') {
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, ...initialControlLoRA };
const controlLoraConfig: ControlLoRAConfig = { ...layer.controlAdapter, type: 'control_lora' };
layer.controlAdapter = controlLoraConfig;
}
break;
Expand Down

0 comments on commit e3b2f31

Please sign in to comment.