From 2eb0c9106ae47f871524bb73464eedb609ab74cf Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 24 Sep 2024 17:43:34 +0530 Subject: [PATCH] Temporarily disable the auto-selection of the appropriate controlnet model --- ui/media/js/main.js | 60 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index bff87b3b..1cbd3288 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -1845,36 +1845,36 @@ controlImagePreview.addEventListener("load", onControlnetModelChange) controlImagePreview.addEventListener("unload", onControlnetModelChange) onControlnetModelChange() -function onControlImageFilterChange() { - let filterId = controlImageFilterField.value - if (filterId.includes("openpose")) { - controlnetModelField.value = "control_v11p_sd15_openpose" - } else if (filterId === "canny") { - controlnetModelField.value = "control_v11p_sd15_canny" - } else if (filterId === "mlsd") { - controlnetModelField.value = "control_v11p_sd15_mlsd" - } else if (filterId === "mlsd") { - controlnetModelField.value = "control_v11p_sd15_mlsd" - } else if (filterId.includes("scribble")) { - controlnetModelField.value = "control_v11p_sd15_scribble" - } else if (filterId.includes("softedge")) { - controlnetModelField.value = "control_v11p_sd15_softedge" - } else if (filterId === "normal_bae") { - controlnetModelField.value = "control_v11p_sd15_normalbae" - } else if (filterId.includes("depth")) { - controlnetModelField.value = "control_v11f1p_sd15_depth" - } else if (filterId === "lineart_anime") { - controlnetModelField.value = "control_v11p_sd15s2_lineart_anime" - } else if (filterId.includes("lineart")) { - controlnetModelField.value = "control_v11p_sd15_lineart" - } else if (filterId === "shuffle") { - controlnetModelField.value = "control_v11e_sd15_shuffle" - } else if (filterId === "segment") { - controlnetModelField.value = "control_v11p_sd15_seg" - } -} -controlImageFilterField.addEventListener("change", onControlImageFilterChange) -onControlImageFilterChange() +// function onControlImageFilterChange() { +// let filterId = controlImageFilterField.value +// if (filterId.includes("openpose")) { +// controlnetModelField.value = "control_v11p_sd15_openpose" +// } else if (filterId === "canny") { +// controlnetModelField.value = "control_v11p_sd15_canny" +// } else if (filterId === "mlsd") { +// controlnetModelField.value = "control_v11p_sd15_mlsd" +// } else if (filterId === "mlsd") { +// controlnetModelField.value = "control_v11p_sd15_mlsd" +// } else if (filterId.includes("scribble")) { +// controlnetModelField.value = "control_v11p_sd15_scribble" +// } else if (filterId.includes("softedge")) { +// controlnetModelField.value = "control_v11p_sd15_softedge" +// } else if (filterId === "normal_bae") { +// controlnetModelField.value = "control_v11p_sd15_normalbae" +// } else if (filterId.includes("depth")) { +// controlnetModelField.value = "control_v11f1p_sd15_depth" +// } else if (filterId === "lineart_anime") { +// controlnetModelField.value = "control_v11p_sd15s2_lineart_anime" +// } else if (filterId.includes("lineart")) { +// controlnetModelField.value = "control_v11p_sd15_lineart" +// } else if (filterId === "shuffle") { +// controlnetModelField.value = "control_v11e_sd15_shuffle" +// } else if (filterId === "segment") { +// controlnetModelField.value = "control_v11p_sd15_seg" +// } +// } +// controlImageFilterField.addEventListener("change", onControlImageFilterChange) +// onControlImageFilterChange() upscaleModelField.disabled = !useUpscalingField.checked upscaleAmountField.disabled = !useUpscalingField.checked