fix lyco patch and validate settings

This commit is contained in:
Vladimir Mandic
2023-09-07 08:54:11 -04:00
parent 39e1f91cce
commit 9d42d7d678
8 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ svg.feather.feather-image, .feather .feather-image { display: none }
#pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) }
.gradio-button.tool { filter: hue-rotate(180deg) saturate(0.5); }
#txt2img_tools, #img2img_tools { margin-top: -4px; margin-bottom: -4px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; z-index: 200; }
/* custom elements overrides */
#steps-animation, #controlnet { border-width: 0; }
+1 -1
View File
@@ -115,7 +115,7 @@ svg.feather.feather-image, .feather .feather-image { display: none }
#pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) }
.gradio-button.tool { filter: hue-rotate(180deg) saturate(0.5); }
#txt2img_tools, #img2img_tools { margin-top: -4px; margin-bottom: -4px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; z-index: 200; }
/* custom elements overrides */
#steps-animation, #controlnet { border-width: 0; }
+1 -1
View File
@@ -122,7 +122,7 @@ svg.feather.feather-image, .feather .feather-image { display: none }
#txt2img_settings { min-width: var(--left-column); max-width: var(--left-column); background-color: #111111; padding-top: 16px; }
#pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) }
#txt2img_tools, #img2img_tools { margin-top: -4px; margin-bottom: -4px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; z-index: 200; }
/* custom elements overrides */
#steps-animation, #controlnet { border-width: 0; }
+2 -2
View File
@@ -179,7 +179,7 @@ function setupExtraNetworksForTab(tabname) {
if (entries[0].intersectionRatio > 0) {
if (window.opts.extra_networks_card_cover === 'cover') {
en.style.transition = '';
en.style.zIndex = 9999;
en.style.zIndex = 100;
en.style.position = 'absolute';
en.style.right = 'unset';
en.style.width = 'unset';
@@ -187,7 +187,7 @@ function setupExtraNetworksForTab(tabname) {
gradioApp().getElementById(`${tabname}_settings`).parentNode.style.width = 'unset';
} else if (window.opts.extra_networks_card_cover === 'sidebar') {
en.style.transition = 'width 0.2s ease';
en.style.zIndex = 9999;
en.style.zIndex = 100;
en.style.position = 'absolute';
en.style.right = '0';
en.style.width = `${window.opts.extra_networks_sidebar_width}vw`;
+1 -1
View File
@@ -122,7 +122,7 @@ svg.feather.feather-image, .feather .feather-image { display: none }
#txt2img_settings { min-width: var(--left-column); max-width: var(--left-column); background-color: #111111; padding-top: 16px; }
#pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) }
#txt2img_tools, #img2img_tools { margin-top: -4px; margin-bottom: -4px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; z-index: 200; }
/* custom elements overrides */
#steps-animation, #controlnet { border-width: 0; }
+1 -1
View File
@@ -115,7 +115,7 @@ svg.feather.feather-image, .feather .feather-image { display: none }
#pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) }
.gradio-button.tool { filter: hue-rotate(120deg) saturate(0.5); }
#txt2img_tools, #img2img_tools { margin-top: -4px; margin-bottom: -4px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; }
#txt2img_styles_row, #img2img_styles_row { margin-top: -6px; z-index: 200; }
/* custom elements overrides */
#steps-animation, #controlnet { border-width: 0; }
+1
View File
@@ -428,6 +428,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), {
"ckpt_dir": OptionInfo(os.path.join(paths.models_path, 'Stable-diffusion'), "Path to directory with stable diffusion checkpoints"),
"diffusers_dir": OptionInfo(os.path.join(paths.models_path, 'Diffusers'), "Path to directory with stable diffusion diffusers"),
"vae_dir": OptionInfo(os.path.join(paths.models_path, 'VAE'), "Path to directory with VAE files"),
"sd_lora": OptionInfo("", "Add LoRA to prompt", gr.CheckboxGroup, {"choices": [], "visible": False}),
"lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Path to directory with LoRA network(s)"),
"lyco_dir": OptionInfo(os.path.join(paths.models_path, 'LyCORIS'), "Path to directory with LyCORIS network(s)"),
"styles_dir": OptionInfo(os.path.join(paths.data_path, 'styles.csv'), "Path to user-defined styles file"),
+3 -2
View File
@@ -966,11 +966,12 @@ def create_ui(startup_timer = None):
def run_settings(*args):
changed = []
for key, value, comp in zip(opts.data_labels.keys(), args, components):
assert comp == dummy_component or opts.same_type(value, opts.data_labels[key].default), f"Bad value for setting {key}: {value}; expecting {type(opts.data_labels[key].default).__name__}"
for key, value, comp in zip(opts.data_labels.keys(), args, components):
if comp == dummy_component:
continue
elif not opts.same_type(value, opts.data_labels[key].default):
log.error(f'Setting bad value: {key}={value} expecting={type(opts.data_labels[key].default).__name__}')
continue
if opts.set(key, value):
changed.append(key)
if cmd_opts.use_directml: