feat(ui): tweak cnet model change

If there is no control image, and the model does not have a default processor, set the processor to `none`.
This commit is contained in:
psychedelicious 2023-06-07 15:49:20 +10:00
parent ae14adec2a
commit 62ac0ed2dc

View File

@ -148,6 +148,10 @@ export const controlNetSlice = createSlice({
state.controlNets[controlNetId].processorNode = CONTROLNET_PROCESSORS[
processorType
].default as RequiredControlNetProcessorNode;
} else {
state.controlNets[controlNetId].processorType = 'none';
state.controlNets[controlNetId].processorNode = CONTROLNET_PROCESSORS
.none.default as RequiredControlNetProcessorNode;
}
}
},