mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
ui quality-of-life improvements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
allows for configurable image tiling for x/y axis separately
|
||||
enable in *scripts -> asymmetric tiling*
|
||||
*note*: traditional symmetric tiling is achieved by setting circular mode for both x and y
|
||||
- **UI**:
|
||||
- force browser cache-invalidate on page load
|
||||
- use correct timezone for log display
|
||||
- improve settings search behavior
|
||||
|
||||
## Update for 2025-02-05
|
||||
|
||||
|
||||
Submodule extensions-builtin/sdnext-modernui updated: 7c2ff11f74...f9a3d574ce
@@ -38,14 +38,18 @@ async function logMonitor() {
|
||||
while (logMonitorEl.childElementCount > 100) logMonitorEl.removeChild(logMonitorEl.firstChild);
|
||||
if (atBottom) logMonitorEl.scrollTop = logMonitorEl.scrollHeight;
|
||||
else logMonitorEl.parentElement.style = 'border-bottom: 2px solid var(--highlight-color);';
|
||||
document.getElementById('logWarnings').innerText = logWarnings;
|
||||
document.getElementById('logErrors').innerText = logErrors;
|
||||
const elWarn = document.getElementById('logWarnings');
|
||||
const elErr = document.getElementById('logErrors');
|
||||
const modenUIBtn = document.getElementById('btn_console');
|
||||
if (elWarn) elWarn.innerText = logWarnings;
|
||||
if (elErr) elErr.innerText = logErrors;
|
||||
if (modenUIBtn) modenUIBtn.setAttribute('error-count', logErrors > 0 ? logErrors : '');
|
||||
};
|
||||
|
||||
document.getElementById('txt2img_gallery').style.height = opts.logmonitor_show ? '50vh' : '55vh';
|
||||
document.getElementById('img2img_gallery').style.height = opts.logmonitor_show ? '50vh' : '55vh';
|
||||
const txtGallery = document.getElementById('txt2img_gallery');
|
||||
if (txtGallery) txtGallery.style.height = opts.logmonitor_show ? '50vh' : '55vh';
|
||||
const imgGallery = document.getElementById('img2img_gallery');
|
||||
if (imgGallery) imgGallery.style.height = opts.logmonitor_show ? '50vh' : '55vh';
|
||||
|
||||
if (!opts.logmonitor_show) {
|
||||
Array.from(document.getElementsByClassName('log-monitor')).forEach((el) => el.style.display = 'none');
|
||||
|
||||
@@ -117,8 +117,10 @@ onAfterUiUpdate(async () => {
|
||||
});
|
||||
|
||||
const settingsSearch = gradioApp().querySelectorAll('#settings_search > label > textarea')[0];
|
||||
let settingsTimer;
|
||||
settingsSearch.oninput = (e) => {
|
||||
setTimeout(() => {
|
||||
if (settingsTimer) clearTimeout(settingsTimer);
|
||||
settingsTimer = setTimeout(() => {
|
||||
log('settingsSearch', e.target.value);
|
||||
showAllSettings();
|
||||
getSettingsTabs().forEach((section) => {
|
||||
@@ -128,7 +130,7 @@ onAfterUiUpdate(async () => {
|
||||
else setting.style.removeProperty('display');
|
||||
});
|
||||
});
|
||||
}, 50);
|
||||
}, 250);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ try:
|
||||
SASolverScheduler,
|
||||
DPMSolverSinglestepScheduler,
|
||||
DPMSolverMultistepScheduler,
|
||||
DPMSolverMultistepInverseScheduler,
|
||||
EDMDPMSolverMultistepScheduler,
|
||||
CosineDPMSolverMultistepScheduler,
|
||||
DPMSolverSDEScheduler,
|
||||
@@ -77,6 +78,10 @@ config = {
|
||||
'DPM++ Cosine': { 'solver_order': 2, 'sigma_schedule': "exponential", 'prediction_type': "v-prediction" },
|
||||
'DPM SDE': { 'use_karras_sigmas': False, 'use_exponential_sigmas': False, 'use_beta_sigmas': False, 'noise_sampler_seed': None, 'timestep_spacing': 'linspace', 'steps_offset': 0, },
|
||||
|
||||
'DPM++ 1S Inverse': { 'thresholding': False, 'sample_max_value': 1.0, 'algorithm_type': "dpmsolver++", 'solver_type': "midpoint", 'lower_order_final': True, 'use_karras_sigmas': False, 'use_exponential_sigmas': False, 'use_flow_sigmas': False, 'use_beta_sigmas': False, 'use_lu_lambdas': False, 'final_sigmas_type': 'zero', 'timestep_spacing': 'linspace', 'solver_order': 1 },
|
||||
'DPM++ 2M Inverse': { 'thresholding': False, 'sample_max_value': 1.0, 'algorithm_type': "dpmsolver++", 'solver_type': "midpoint", 'lower_order_final': True, 'use_karras_sigmas': False, 'use_exponential_sigmas': False, 'use_flow_sigmas': False, 'use_beta_sigmas': False, 'use_lu_lambdas': False, 'final_sigmas_type': 'zero', 'timestep_spacing': 'linspace', 'solver_order': 2 },
|
||||
'DPM++ 3M Inverse': { 'thresholding': False, 'sample_max_value': 1.0, 'algorithm_type': "dpmsolver++", 'solver_type': "midpoint", 'lower_order_final': True, 'use_karras_sigmas': False, 'use_exponential_sigmas': False, 'use_flow_sigmas': False, 'use_beta_sigmas': False, 'use_lu_lambdas': False, 'final_sigmas_type': 'zero', 'timestep_spacing': 'linspace', 'solver_order': 3 },
|
||||
|
||||
'DPM2 FlowMatch': { 'shift': 1, 'use_dynamic_shifting': False, 'solver_order': 2, 'sigma_schedule': None, 'use_beta_sigmas': False, 'algorithm_type': 'dpmsolver2', 'use_noise_sampler': True, 'beta_start': 0.00085, 'beta_end': 0.012 },
|
||||
'DPM2a FlowMatch': { 'shift': 1, 'use_dynamic_shifting': False, 'solver_order': 2, 'sigma_schedule': None, 'use_beta_sigmas': False, 'algorithm_type': 'dpmsolver2A', 'use_noise_sampler': True, 'beta_start': 0.00085, 'beta_end': 0.012 },
|
||||
'DPM2++ 2M FlowMatch': { 'shift': 1, 'use_dynamic_shifting': False, 'solver_order': 2, 'sigma_schedule': None, 'use_beta_sigmas': False, 'algorithm_type': 'dpmsolver++2M', 'use_noise_sampler': True, 'beta_start': 0.00085, 'beta_end': 0.012 },
|
||||
@@ -128,6 +133,10 @@ samplers_data_diffusers = [
|
||||
SamplerData('DPM++ Cosine', lambda model: DiffusionSampler('DPM++ 2M EDM', CosineDPMSolverMultistepScheduler, model), [], {}),
|
||||
SamplerData('DPM SDE', lambda model: DiffusionSampler('DPM SDE', DPMSolverSDEScheduler, model), [], {}),
|
||||
|
||||
SamplerData('DPM++ 1S Inverse', lambda model: DiffusionSampler('DPM++ 1S Inverse', DPMSolverMultistepInverseScheduler, model), [], {}),
|
||||
SamplerData('DPM++ 2M Inverse', lambda model: DiffusionSampler('DPM++ 2M Inverse', DPMSolverMultistepInverseScheduler, model), [], {}),
|
||||
SamplerData('DPM++ 3M Inverse', lambda model: DiffusionSampler('DPM++ 3M Inverse', DPMSolverMultistepInverseScheduler, model), [], {}),
|
||||
|
||||
SamplerData('DPM2 FlowMatch', lambda model: DiffusionSampler('DPM2 FlowMatch', FlowMatchDPMSolverMultistepScheduler, model), [], {}),
|
||||
SamplerData('DPM2a FlowMatch', lambda model: DiffusionSampler('DPM2a FlowMatch', FlowMatchDPMSolverMultistepScheduler, model), [], {}),
|
||||
SamplerData('DPM2++ 2M FlowMatch', lambda model: DiffusionSampler('DPM2++ 2M FlowMatch', FlowMatchDPMSolverMultistepScheduler, model), [], {}),
|
||||
|
||||
+1
-1
@@ -925,7 +925,7 @@ options_templates.update(options_section(('interrogate', "Interrogate"), {
|
||||
options_templates.update(options_section(('huggingface', "Huggingface"), {
|
||||
"huggingface_sep": OptionInfo("<h2>Huggingface</h2>", "", gr.HTML),
|
||||
"diffuser_cache_config": OptionInfo(True, "Use cached model config when available"),
|
||||
"huggingface_token": OptionInfo('', 'HuggingFace token'),
|
||||
"huggingface_token": OptionInfo('', 'HuggingFace token', gr.Textbox, {"lines": 2}),
|
||||
"diffusers_model_load_variant": OptionInfo("default", "Preferred Model variant", gr.Radio, {"choices": ['default', 'fp32', 'fp16']}),
|
||||
"diffusers_vae_load_variant": OptionInfo("default", "Preferred VAE variant", gr.Radio, {"choices": ['default', 'fp32', 'fp16']}),
|
||||
"custom_diffusers_pipeline": OptionInfo('', 'Load custom Diffusers pipeline'),
|
||||
|
||||
+2
-1
@@ -90,7 +90,7 @@ def reload_gradio_theme():
|
||||
gradio_theme = gr.themes.Base(**default_font_params)
|
||||
available_themes = list_themes()
|
||||
if theme_name not in available_themes:
|
||||
modules.shared.log.error(f'UI theme invalid: type={modules.shared.opts.theme_type} theme="{theme_name}" available={available_themes}')
|
||||
# modules.shared.log.error(f'UI theme invalid: type={modules.shared.opts.theme_type} theme="{theme_name}"')
|
||||
if modules.shared.opts.theme_type == 'Standard':
|
||||
theme_name = 'black-teal'
|
||||
elif modules.shared.opts.theme_type == 'Modern':
|
||||
@@ -99,6 +99,7 @@ def reload_gradio_theme():
|
||||
modules.shared.opts.theme_type = 'Standard'
|
||||
theme_name = 'black-teal'
|
||||
|
||||
|
||||
modules.shared.opts.data['gradio_theme'] = theme_name
|
||||
|
||||
if theme_name.lower() in ['lobe', 'cozy-nest']:
|
||||
|
||||
+1
-1
Submodule wiki updated: 1318ce640a...d2874ede11
Reference in New Issue
Block a user