Add option to disable thumbnail display (#36)

This commit is contained in:
Chenlei Hu
2024-02-04 03:30:30 +00:00
committed by GitHub
parent 1ed747d5f9
commit 83277b15f4
2 changed files with 3 additions and 6 deletions

View File

@@ -260,6 +260,7 @@
* and mask on the accordion header.
*/
updateInputImageThumbnail() {
if (!opts.controlnet_input_thumbnail) return;
if (this.tabOpen) {
this.removeThumbnail();
} else {

View File

@@ -453,12 +453,8 @@ def on_ui_settings():
False, "Disable photopea edit", gr.Checkbox, {"interactive": True}, section=section))
shared.opts.add_option("controlnet_photopea_warning", shared.OptionInfo(
True, "Photopea popup warning", gr.Checkbox, {"interactive": True}, section=section))
shared.opts.add_option("controlnet_ignore_noninpaint_mask", shared.OptionInfo(
False, "Ignore mask on ControlNet input image if control type is not inpaint",
gr.Checkbox, {"interactive": True}, section=section))
shared.opts.add_option("controlnet_clip_detector_on_cpu", shared.OptionInfo(
False, "Load CLIP preprocessor model on CPU",
gr.Checkbox, {"interactive": True}, section=section))
shared.opts.add_option("controlnet_input_thumbnail", shared.OptionInfo(
True, "Input image thumbnail on unit header", gr.Checkbox, {"interactive": True}, section=section))
script_callbacks.on_ui_settings(on_ui_settings)