This commit is contained in:
Mary Hipp 2024-03-18 15:06:38 -04:00 committed by psychedelicious
parent d89e653588
commit fe563f05fc
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ export const initialControlNet: Omit<ControlNetConfig, 'id'> = {
controlImage: null, controlImage: null,
processedControlImage: null, processedControlImage: null,
processorType: 'canny_image_processor', processorType: 'canny_image_processor',
processorNode: CONTROLNET_PROCESSORS.canny_image_processor.default as RequiredCannyImageProcessorInvocation, processorNode: CONTROLNET_PROCESSORS.canny_image_processor.buildDefaults() as RequiredCannyImageProcessorInvocation,
shouldAutoConfig: true, shouldAutoConfig: true,
}; };
@ -36,7 +36,7 @@ export const initialT2IAdapter: Omit<T2IAdapterConfig, 'id'> = {
controlImage: null, controlImage: null,
processedControlImage: null, processedControlImage: null,
processorType: 'canny_image_processor', processorType: 'canny_image_processor',
processorNode: CONTROLNET_PROCESSORS.canny_image_processor.default as RequiredCannyImageProcessorInvocation, processorNode: CONTROLNET_PROCESSORS.canny_image_processor.buildDefaults() as RequiredCannyImageProcessorInvocation,
shouldAutoConfig: true, shouldAutoConfig: true,
}; };

View File

@ -5,7 +5,7 @@ import type { ControlNetModelConfig, T2IAdapterModelConfig } from 'services/api/
export const buildControlAdapterProcessor = (modelConfig: ControlNetModelConfig | T2IAdapterModelConfig) => { export const buildControlAdapterProcessor = (modelConfig: ControlNetModelConfig | T2IAdapterModelConfig) => {
const defaultPreprocessor = modelConfig.default_settings?.preprocessor; const defaultPreprocessor = modelConfig.default_settings?.preprocessor;
const processorType = isControlAdapterProcessorType(defaultPreprocessor) ? defaultPreprocessor : 'none'; const processorType = isControlAdapterProcessorType(defaultPreprocessor) ? defaultPreprocessor : 'none';
const processorNode = CONTROLNET_PROCESSORS[processorType].default; const processorNode = CONTROLNET_PROCESSORS[processorType].buildDefaults(modelConfig.base);
return { processorType, processorNode }; return { processorType, processorNode };
}; };