From 959f9e2da50db911b48552036ec52ef020754936 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 5 Feb 2025 17:07:59 -0500 Subject: [PATCH 01/96] fix startup with skip Signed-off-by: Vladimir Mandic --- installer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/installer.py b/installer.py index ba5ca5952..be500e5a4 100644 --- a/installer.py +++ b/installer.py @@ -560,9 +560,10 @@ def install_cuda(): def install_rocm_zluda(): + torch_command = '' t_start = time.time() if args.skip_all or args.skip_requirements: - return None + return torch_command from modules import rocm if not rocm.is_installed: log.warning('ROCm: could not find ROCm toolkit installed') @@ -604,7 +605,6 @@ def install_rocm_zluda(): if device is not None: msg += f', using agent {device.name}' log.info(msg) - torch_command = '' if sys.platform == "win32": # TODO install: enable ROCm for windows when available check_python(supported_minors=[10, 11], reason='ZLUDA backend requires Python 3.10 or 3.11') @@ -824,14 +824,12 @@ def check_torch(): torch_command = install_ipex(torch_command) elif allow_openvino and args.use_openvino: # prioritize openvino torch_command = install_openvino(torch_command) - elif is_cuda_available: torch_command = install_cuda() elif is_rocm_available: torch_command = install_rocm_zluda() elif is_ipex_available: torch_command = install_ipex(torch_command) - else: machine = platform.machine() if sys.platform == 'darwin': From 47b484816a744a6db4a965f56c36d74b9b3bcf3f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 6 Feb 2025 09:13:13 -0500 Subject: [PATCH 02/96] add asymmetric tiling Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 8 ++++ scripts/tiling.py | 104 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 scripts/tiling.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 212a0402d..8adadb3bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log for SD.Next +## Update for 2025-02-06 + +- **Other**: + - asymmetric tiling + 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 + ## Update for 2025-02-05 - refresh dev/master branches diff --git a/scripts/tiling.py b/scripts/tiling.py new file mode 100644 index 000000000..60c234dcf --- /dev/null +++ b/scripts/tiling.py @@ -0,0 +1,104 @@ +from typing import Optional +import torch +import gradio as gr +from PIL import Image +from diffusers.models.lora import LoRACompatibleConv +from torch import Tensor +from torch.nn import functional as F +from torch.nn.modules.utils import _pair +from modules import scripts, processing, shared + + +modex = 'constant' +modey = 'constant' + + +def asymmetricConv2DConvForward(self, input: Tensor, weight: Tensor, bias: Optional[Tensor]): # pylint: disable=redefined-builtin + self.paddingX = (self._reversed_padding_repeated_twice[0], self._reversed_padding_repeated_twice[1], 0, 0) # pylint: disable=protected-access + self.paddingY = (0, 0, self._reversed_padding_repeated_twice[2], self._reversed_padding_repeated_twice[3]) # pylint: disable=protected-access + working = F.pad(input, self.paddingX, mode=modex) + working = F.pad(working, self.paddingY, mode=modex) + return F.conv2d(working, weight, bias, self.stride, _pair(0), self.dilation, self.groups) + + +class Script(scripts.Script): + def __init__(self): + super().__init__() + self.orig_pipe = None + self.conv_layers = [] + self.modes = ['constant', 'circular', 'reflect', 'replicate'] + + def title(self): + return 'Asymmetric Tiling' + + def show(self, is_img2img): + return shared.native + + def ui(self, _is_img2img): # ui elements + with gr.Row(): + gr.HTML('Asymmetric Tiling
') + with gr.Row(): + tilex = gr.Dropdown(label="Mode x-axis", choices=self.modes, value='constant') + numx = gr.Slider(label="Repeat x-axis", value=1, minimum=1, maximum=10, step=1) + with gr.Row(): + tiley = gr.Dropdown(label="Mode y-axis", choices=self.modes, value='constant') + numy = gr.Slider(label="Repeat y-axis", value=1, minimum=1, maximum=10, step=1) + return [tilex, numx, tiley, numy] + + def run(self, p: processing.StableDiffusionProcessing, tilex:bool=False, numx:int=1, tiley:bool=False, numy:int=1): # pylint: disable=arguments-differ, unused-argument + global modex, modey # pylint: disable=global-statement + supported_model_list = ['sd', 'sdxl'] + if shared.sd_model_type not in supported_model_list: + shared.log.warning(f'Tiling: class={shared.sd_model.__class__.__name__} model={shared.sd_model_type} required={supported_model_list}') + return None + if not tilex and not tiley: + return None + self.orig_pipe = shared.sd_model + + modex = tilex + modey = tiley + self.conv_layers.clear() + targets = [shared.sd_model.vae, shared.sd_model.text_encoder, shared.sd_model.unet] + for target in targets: + for module in target.modules(): + if isinstance(module, torch.nn.Conv2d): + self.conv_layers.append(module) + + for cl in self.conv_layers: + if isinstance(cl, LoRACompatibleConv) and cl.lora_layer is None: + cl.lora_layer = lambda *x: 0 + if hasattr(cl, '_conv_forward'): + cl._orig_conv_forward = cl._conv_forward # pylint: disable=protected-access + cl._conv_forward = asymmetricConv2DConvForward.__get__(cl, torch.nn.Conv2d) # pylint: disable=protected-access, no-value-for-parameter + shared.log.info(f'Tiling: x={tilex}:{numx} y={tiley}:{numy}') + + + def after(self, p: processing.StableDiffusionProcessing, processed: processing.Processed, tilex:bool=False, numx:int=1, tiley:bool=False, numy:int=1): # pylint: disable=arguments-differ, unused-argument + if len(self.conv_layers) == 0: + return processed + for cl in self.conv_layers: + if hasattr(cl, '_orig_conv_forward'): + cl._conv_forward = cl._orig_conv_forward # pylint: disable=protected-access + if self.orig_pipe is None: + return processed + if shared.sd_model_type == "sdxl": + shared.sd_model = self.orig_pipe + self.orig_pipe = None + self.conv_layers.clear() + if not hasattr(processed, 'images') or processed.images is None: + return processed + images = [] + for image in processed.images: + if tilex and isinstance(image, Image.Image): + tiled = Image.new('RGB', (image.width * numx, image.height), (0, 0, 0)) + for i in range(numx): + tiled.paste(image, (i * image.width, 0)) + image = tiled + if tiley and isinstance(image, Image.Image): + tiled = Image.new('RGB', (image.width, image.height * numy), (0, 0, 0)) + for i in range(numy): + tiled.paste(image, (0, i * image.height)) + image = tiled + images.append(image) + processed.images = images + return processed From e018ed627d3eb477f5de1a0db21baa38d37a94ce Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 6 Feb 2025 16:48:31 -0500 Subject: [PATCH 03/96] ui quality-of-life improvements Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 4 ++++ extensions-builtin/sdnext-modernui | 2 +- javascript/logMonitor.js | 12 ++++++++---- javascript/settings.js | 6 ++++-- modules/sd_samplers_diffusers.py | 9 +++++++++ modules/shared.py | 2 +- modules/theme.py | 3 ++- wiki | 2 +- 8 files changed, 30 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8adadb3bd..f49aebfa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/extensions-builtin/sdnext-modernui b/extensions-builtin/sdnext-modernui index 7c2ff11f7..f9a3d574c 160000 --- a/extensions-builtin/sdnext-modernui +++ b/extensions-builtin/sdnext-modernui @@ -1 +1 @@ -Subproject commit 7c2ff11f7400e62cd2312524191d11fb8a7f4ce0 +Subproject commit f9a3d574ce0a8e895d7a4c4bbc52d4569084b976 diff --git a/javascript/logMonitor.js b/javascript/logMonitor.js index 151bb9df5..1e76cb3fe 100644 --- a/javascript/logMonitor.js +++ b/javascript/logMonitor.js @@ -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'); diff --git a/javascript/settings.js b/javascript/settings.js index ed01b4b6b..a5ec1cd15 100644 --- a/javascript/settings.js +++ b/javascript/settings.js @@ -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); }; }); diff --git a/modules/sd_samplers_diffusers.py b/modules/sd_samplers_diffusers.py index 1e26ec4f1..ab7e56e72 100644 --- a/modules/sd_samplers_diffusers.py +++ b/modules/sd_samplers_diffusers.py @@ -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), [], {}), diff --git a/modules/shared.py b/modules/shared.py index 9f0fc4aa9..3ec5ca96c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -925,7 +925,7 @@ options_templates.update(options_section(('interrogate', "Interrogate"), { options_templates.update(options_section(('huggingface', "Huggingface"), { "huggingface_sep": OptionInfo("

Huggingface

", "", 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'), diff --git a/modules/theme.py b/modules/theme.py index c6450ed29..d3d36d167 100644 --- a/modules/theme.py +++ b/modules/theme.py @@ -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']: diff --git a/wiki b/wiki index 1318ce640..d2874ede1 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 1318ce640a5c04053d13022233cb3ae55c40cef9 +Subproject commit d2874ede112773837e03e55684df763f1b0c3140 From cd1a9c58e6e769ab3027500e0b5afaf9e1f9dc2a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 6 Feb 2025 17:01:34 -0500 Subject: [PATCH 04/96] ui log scroll to bottom Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 1 + javascript/logger.js | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f49aebfa3..4944c97fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - force browser cache-invalidate on page load - use correct timezone for log display - improve settings search behavior + - log scroll to bottom ## Update for 2025-02-05 diff --git a/javascript/logger.js b/javascript/logger.js index 08baf1165..111899005 100644 --- a/javascript/logger.js +++ b/javascript/logger.js @@ -1,23 +1,37 @@ const timeout = 30000; +const scrollBottom = async (el) => { + const lastChild = el.lastElementChild; + if (lastChild) lastChild.scrollIntoView({ behavior: 'smooth' }); +}; + const log = async (...msg) => { const dt = new Date(); const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`; - if (window.logger) window.logger.innerHTML += window.logPrettyPrint(...msg); + if (window.logger) { + window.logger.innerHTML += window.logPrettyPrint(...msg); + scrollBottom(window.logger); + } console.log(ts, ...msg); // eslint-disable-line no-console }; const debug = async (...msg) => { const dt = new Date(); const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`; - if (window.logger) window.logger.innerHTML += window.logPrettyPrint(...msg); + if (window.logger) { + window.logger.innerHTML += window.logPrettyPrint(...msg); + scrollBottom(window.logger); + } console.debug(ts, ...msg); // eslint-disable-line no-console }; const error = async (...msg) => { const dt = new Date(); const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`; - if (window.logger) window.logger.innerHTML += window.logPrettyPrint(...msg); + if (window.logger) { + window.logger.innerHTML += window.logPrettyPrint(...msg); + scrollBottom(window.logger); + } console.error(ts, ...msg); // eslint-disable-line no-console // const txt = msg.join(' '); // if (!txt.includes('asctime') && !txt.includes('xhr.')) xhrPost('/sdapi/v1/log', { error: txt }); // eslint-disable-line no-use-before-define From 4f09014ec86f5f92dca714da57f39e78f88029ed Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Fri, 7 Feb 2025 15:56:42 +0900 Subject: [PATCH 05/96] zluda torch 2.6.0 --- installer.py | 2 +- modules/zluda_installer.py | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/installer.py b/installer.py index be500e5a4..6a08d1b82 100644 --- a/installer.py +++ b/installer.py @@ -633,7 +633,7 @@ def install_rocm_zluda(): zluda_installer.set_blaslt_enabled(device.blaslt_supported) zluda_installer.make_copy() zluda_installer.load() - torch_command = os.environ.get('TORCH_COMMAND', f'torch=={zluda_installer.get_default_torch_version(device)} torchvision --index-url https://download.pytorch.org/whl/cu118') + torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.6.0 torchvision --index-url https://download.pytorch.org/whl/cu118') log.info(f'Using ZLUDA in {zluda_installer.path}') except Exception as e: error = e diff --git a/modules/zluda_installer.py b/modules/zluda_installer.py index 8888a56f4..df3002b79 100644 --- a/modules/zluda_installer.py +++ b/modules/zluda_installer.py @@ -5,7 +5,7 @@ import ctypes import shutil import zipfile import urllib.request -from typing import Optional, Union +from typing import Union from modules import rocm @@ -94,8 +94,11 @@ def load() -> None: ctypes.windll.LoadLibrary(os.path.join(path, v)) if hipBLASLt_enabled: + os.environ.setdefault("DISABLE_ADDMM_CUDA_LT", "0") ctypes.windll.LoadLibrary(os.path.join(rocm.path, 'bin', 'hipblaslt.dll')) ctypes.windll.LoadLibrary(os.path.join(path, 'cublasLt64_11.dll')) + else: + os.environ["DISABLE_ADDMM_CUDA_LT"] = "1" def conceal(): import torch # pylint: disable=unused-import @@ -110,12 +113,3 @@ def load() -> None: return os.path.join(cpp_extension.ROCM_HOME, *paths) cpp_extension._join_rocm_home = _join_rocm_home # pylint: disable=protected-access rocm.conceal = conceal - - -def get_default_torch_version(agent: Optional[rocm.Agent]) -> str: - if agent is not None: - if agent.arch in (rocm.MicroArchitecture.RDNA, rocm.MicroArchitecture.CDNA,): - return "2.4.1" if hipBLASLt_enabled else "2.3.1" - elif agent.arch == rocm.MicroArchitecture.GCN: - return "2.2.1" - return "2.4.1" if hipBLASLt_enabled else "2.3.1" From c30b275ba4272cd21a7b50727d657f8e5dcec6a5 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 7 Feb 2025 10:22:51 -0500 Subject: [PATCH 06/96] update changelog Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4944c97fb..d4a60da17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,15 @@ # Change Log for SD.Next -## Update for 2025-02-06 +## Update for 2025-02-07 +- **Torch**: + - for **zluda** set default to `torch==2.6.0+cu126` - **Other**: - asymmetric tiling 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**: +- **UI**: - force browser cache-invalidate on page load - use correct timezone for log display - improve settings search behavior From 5f6a363453e4cb10ef1e15771958f8b4c67d247e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 7 Feb 2025 11:03:24 -0500 Subject: [PATCH 07/96] update cli tools Signed-off-by: Vladimir Mandic --- ...mage-interrogate.py => api-interrogate.py} | 0 cli/hf-convert.py | 35 ------------------- cli/image-encode.py | 1 - 3 files changed, 36 deletions(-) rename cli/{image-interrogate.py => api-interrogate.py} (100%) delete mode 100755 cli/hf-convert.py diff --git a/cli/image-interrogate.py b/cli/api-interrogate.py similarity index 100% rename from cli/image-interrogate.py rename to cli/api-interrogate.py diff --git a/cli/hf-convert.py b/cli/hf-convert.py deleted file mode 100755 index eeefdce5e..000000000 --- a/cli/hf-convert.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import logging -import torch -import diffusers -import safetensors -import safetensors.torch as sf - -log = logging.getLogger("sd") -logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s | %(message)s') - - -def convert(model_id, output_name): - if os.path.exists(output_name): - log.error(f'Output already exists: {output_name}') - return - pipe = diffusers.DiffusionPipeline.from_pretrained(model_id) - metadata = { 'model_id': model_id } - model = {} - model['state_dict'] = vars(pipe)['_internal_dict'] - for k in model['state_dict'].keys(): - # print(k, getattr(pipe, k)) - model[k] = getattr(pipe, k) - sf.save_model(model, output_name, metadata=metadata) - # log.info(f'Saved model: {output_name}') - -if __name__ == "__main__": - sys.argv.pop(0) - if len(sys.argv) < 2: - log.info('Usage: hf-convert.py ') - sys.exit(1) - log.debug(f'Packages: torch={torch.__version__} diffusers={diffusers.__version__} safetensors={safetensors.__version__}') - convert(sys.argv[0], sys.argv[1]) diff --git a/cli/image-encode.py b/cli/image-encode.py index 0769c2544..832c50b14 100755 --- a/cli/image-encode.py +++ b/cli/image-encode.py @@ -29,4 +29,3 @@ if __name__ == "__main__": print('=== BEGIN ===') print(f'{b64}') print('=== END ===') - From 7041b2b7cc6d93d9ebed2fc82e7c7e3bb30558d6 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sat, 8 Feb 2025 21:49:34 +0300 Subject: [PATCH 08/96] Update OpenVINO to 2025.0.0 --- CHANGELOG.md | 1 + installer.py | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4a60da17..fc8147d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ 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 + - update openvino to `2025.0.0` - **UI**: - force browser cache-invalidate on page load - use correct timezone for log display diff --git a/installer.py b/installer.py index 6a08d1b82..911d2bdd6 100644 --- a/installer.py +++ b/installer.py @@ -719,23 +719,22 @@ def install_ipex(torch_command): else: torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.6.0+xpu torchvision==0.21.0+xpu --index-url https://download.pytorch.org/whl/xpu') - install(os.environ.get('OPENVINO_COMMAND', 'openvino==2024.6.0'), 'openvino', ignore=True) - install('nncf==2.7.0', ignore=True, no_deps=True) # requires older pandas ts('ipex', t_start) return torch_command def install_openvino(torch_command): t_start = time.time() - check_python(supported_minors=[9, 10, 11, 12], reason='OpenVINO backend requires a Python version between 3.9 and 3.12') + # Python 3.12: RuntimeError: Dynamo is not supported on Python 3.12+ + check_python(supported_minors=[9, 10, 11], reason='OpenVINO backend requires a Python version from 3.9, 3.10 or 3.11') log.info('OpenVINO: selected') if sys.platform == 'darwin': torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.3.1 torchvision==0.18.1') else: torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.3.1+cpu torchvision==0.18.1+cpu --index-url https://download.pytorch.org/whl/cpu') - install(os.environ.get('OPENVINO_COMMAND', 'openvino==2024.6.0'), 'openvino') - install('nncf==2.14.1', 'nncf') + install(os.environ.get('OPENVINO_COMMAND', 'openvino==2025.0.0'), 'openvino') + install(os.environ.get('NNCF_COMMAND', 'nncf==2.15.0'), 'nncf') os.environ.setdefault('PYTORCH_TRACING_MODE', 'TORCHFX') if os.environ.get("NEOReadDebugKeys", None) is None: os.environ.setdefault('NEOReadDebugKeys', '1') From 8873b2f696176273a7718e0c29a4cf33b2e7207c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 7 Feb 2025 17:48:05 -0500 Subject: [PATCH 09/96] massive hints update Signed-off-by: Vladimir Mandic --- html/locale_en.json | 1030 ++++++++++++++++++++++++++++++++--- html/locale_ko.json | 1 - javascript/setHints.js | 56 +- modules/postprocess/yolo.py | 4 +- modules/shared.py | 22 +- modules/ui_loadsave.py | 8 +- modules/ui_sections.py | 2 +- wiki | 2 +- 8 files changed, 1015 insertions(+), 110 deletions(-) diff --git a/html/locale_en.json b/html/locale_en.json index 8c7f036b4..9c9107751 100644 --- a/html/locale_en.json +++ b/html/locale_en.json @@ -1,16 +1,10 @@ {"icons": [ {"id":"","label":"🎲️","localized":"","hint":"Use random seed"}, - {"id":"","label":"♻️","localized":"","hint":"Reuse previous seed"}, {"id":"","label":"🔄","localized":"","hint":"Reset values"}, {"id":"","label":"⬆️","localized":"","hint":"Upload image"}, {"id":"","label":"⬅️","localized":"","hint":"Reuse image"}, {"id":"","label":"⇅","localized":"","hint":"Swap values"}, - {"id":"","label":"⇦","localized":"","hint":"Read parameters from last generated image"}, - {"id":"","label":"⊗","localized":"","hint":"Clear prompt"}, - {"id":"","label":"🗁","localized":"","hint":"Show/hide extra networks"}, - {"id":"","label":"⇰","localized":"","hint":"Apply selected styles to current prompt"}, {"id":"","label":"⇨","localized":"","hint":"Apply preset to Manual Block Merge tab"}, - {"id":"","label":"⇩","localized":"","hint":"Save parameters from last generated image as style template"}, {"id":"","label":"🕮","localized":"","hint":"Save parameters from last generated image as style template"}, {"id":"","label":"⇕","localized":"","hint":"Sort by: Name asc/desc, Size largest/smallest, Time newest/oldest"}, {"id":"","label":"⟲","localized":"","hint":"Refresh"}, @@ -24,8 +18,6 @@ {"id":"","label":"🖌️","localized":"","hint":"LaMa remove selected object from image"}, {"id":"","label":"🖼️","localized":"","hint":"Show preview"}, {"id":"","label":"♻","localized":"","hint":"Interrogate image"}, - {"id":"","label":"✎","localized":"","hint":"Interrogate image using BLIP model"}, - {"id":"","label":"✐","localized":"","hint":"Interrogate image using DeepBooru model"}, {"id":"","label":"↶","localized":"","hint":"Apply selected style to prompt"}, {"id":"","label":"↷","localized":"","hint":"Save current prompt to style"} ], @@ -33,21 +25,14 @@ {"id":"","label":"Prompt","localized":"","hint":"Describe image you want to generate"}, {"id":"","label":"Negative prompt","localized":"","hint":"Describe what you don't want to see in generated image"} ], -"common keywords": [ - {"id":"","label":"fp16","localized":"","hint":"Number representation in 16-bit floating point format"}, - {"id":"","label":"fp32","localized":"","hint":"Number representation in 32-bit floating point format"}, - {"id":"","label":"bf16","localized":"","hint":"Number representation in alternative 16-bit floating point format"} -], "tabs": [ {"id":"","label":"Text","localized":"","hint":"Create image from text"}, {"id":"","label":"Image","localized":"","hint":"Create image from image"}, {"id":"","label":"Control","localized":"","hint":"Create image with additional control"}, {"id":"","label":"Process","localized":"","hint":"Process existing image"}, {"id":"","label":"Interrogate","localized":"","hint":"Run interrogate to get description of your image"}, - {"id":"","label":"Train","localized":"","hint":"Run training"}, - {"id":"","label":"Models","localized":"","hint":"Convert or merge your models"}, + {"id":"","label":"Models","localized":"","hint":"Download, convert or merge your models and manage models metadata"}, {"id":"","label":"Agent Scheduler","localized":"","hint":"Enqueue your generate requests and run them in the background"}, - {"id":"","label":"Image Browser","localized":"","hint":"Browse through your generated image database"}, {"id":"","label":"System","localized":"","hint":"System settings and information"}, {"id":"","label":"System Info","localized":"","hint":"System information"}, {"id":"","label":"Settings","localized":"","hint":"Application settings"}, @@ -57,31 +42,41 @@ "action panel": [ {"id":"","label":"Generate","localized":"","hint":"Start processing"}, {"id":"","label":"Enqueue","localized":"","hint":"Add task to background queue in Agent Scheduler"}, + {"id":"","label":"reprocess","localized":"","hint":"Reprocess previous generations using different parameters"}, {"id":"","label":"Stop","localized":"","hint":"Stop processing"}, {"id":"","label":"Skip","localized":"","hint":"Stop processing current job and continue processing"}, {"id":"","label":"Pause","localized":"","hint":"Pause processing"}, {"id":"","label":"Restore","localized":"","hint":"Restore parameters from current prompt or last known generated image"}, {"id":"","label":"Clear","localized":"","hint":"Clear prompts"}, - {"id":"","label":"Networks","localized":"","hint":"Open extra network interface"} + {"id":"","label":"Networks","localized":"","hint":"Networks user interface"} ], "extra networks": [ - {"id":"","label":"ui position","localized":"","hint":"Location of extra networks"}, {"id":"","label":"cover","localized":"","hint":"cover full area"}, {"id":"","label":"inline","localized":"","hint":"inline with all additional elements (scrollable)"}, {"id":"","label":"sidebar","localized":"","hint":"sidebar on the right side of the screen"}, - {"id":"","label":"Default multiplier for extra networks","localized":"","hint":"When adding extra network such as Lora to prompt, use this multiplier for it"}, - {"id":"","label":"Model","localized":"","hint":"Trained model checkpoints"}, + {"id":"","label":"Default strength","localized":"","hint":"When adding extra network such as Lora to prompt, use this multiplier for it"}, + {"id":"","label":"Model","localized":"","hint":"Base model"}, {"id":"","label":"Style","localized":"","hint":"Additional styles to be applied on selected generation parameters"}, {"id":"","label":"Styles","localized":"","hint":"Additional styles to be applied on selected generation parameters"}, {"id":"","label":"Lora","localized":"","hint":"LoRA: Low-Rank Adaptation. Fine-tuned model that is applied on top of a loaded model"}, {"id":"","label":"Embedding","localized":"","hint":"Textual inversion embedding is a trained embedded information about the subject"}, {"id":"","label":"Hypernetwork","localized":"","hint":"Small trained neural network that modifies behavior of the loaded model"}, + {"id":"","label":"vae","localized":"","hint":"Variable Auto Encoder: model used to run image decode at the end of generate"}, + {"id":"","label":"history","localized":"","hint":"List of previous generations that can be further reprocessed"}, {"id":"","label":"UI disable variable aspect ratio","localized":"","hint":"When disabled, all thumbnails appear as squared images"}, {"id":"","label":"Build info on first access","localized":"","hint":"Prevents server from building EN page on server startup and instead build it when requested"}, - {"id":"","label":"Show built-in styles","localized":"","hint":"Show or hide build-it styles"}, - {"id":"","label":"LoRA use alternative loading method","localized":"","hint":"Alternative method uses diffusers built-in LoRA capabilities instead of native SD.Next implementation (may reduce LoRA compatibility)"}, - {"id":"","label":"LoRA use merge when using alternative method","localized":"","hint":"When loading LoRAs, immediately merge weights with underlying model instead of applying them on-the-fly"}, - {"id":"","label":"LoRA memory cache","localized":"","hint":"How many LoRAs to keep in network for future use before requiring reloading from storage"} + {"id":"","label":"Show reference styles","localized":"","hint":"Show or hide build-it styles"}, + {"id":"","label":"LoRA load using Diffusers method","localized":"","hint":"Alternative method uses diffusers built-in LoRA capabilities instead of native SD.Next implementation (may reduce LoRA compatibility)"}, + {"id":"","label":"LoRA fuse directly to model","localized":"","hint":"When loading LoRAs, immediately merge weights with underlying model instead of applying them on-the-fly"}, + {"id":"","label":"LoRA memory cache","localized":"","hint":"How many LoRAs to keep in network for future use before requiring reloading from storage"}, + {"id":"","label":"local","localized":"","hint":"Models that are downlaoded and ready to use"}, + {"id":"","label":"reference","localized":"","hint":"List of reference models that can be automatically downloaded on first use"}, + {"id":"","label":"sd15","localized":"","hint":"Stable Diffusion 1.5"}, + {"id":"","label":"sd21","localized":"","hint":"Stable Diffusion 2.1"}, + {"id":"","label":"sd35","localized":"","hint":"StableDiffusion 3.5"}, + {"id":"","label":"sdxl","localized":"","hint":"StableDiffusion XL"}, + {"id":"","label":"sc","localized":"","hint":"StableCascade"}, + {"id":"","label":"flux","localized":"","hint":"FLUX.1"} ], "gallery buttons": [ {"id":"","label":"show","localized":"","hint":"Show image location"}, @@ -107,36 +102,37 @@ {"id":"","label":"Refresh extension list","localized":"","hint":"Refresh list of available extensions"}, {"id":"","label":"Update all installed","localized":"","hint":"Update installed extensions to their latest available version"}, {"id":"","label":"Apply changes","localized":"","hint":"Apply all changes and restart server"}, - {"id":"","label":"install","localized":"","hint":"install this extension"}, {"id":"","label":"uninstall","localized":"","hint":"uninstall this extension"}, - {"id":"","label":"User interface","localized":"","hint":"Review and set current values as default values for the user interface"}, - {"id":"","label":"Set new defaults","localized":"","hint":"Set current values as default values for the user interface"}, + {"id":"","label":"User interface","localized":"","hint":"Review and set user interface preferences"}, + {"id":"","label":"Set ui defaults","localized":"","hint":"Set current values as default values for the user interface"}, {"id":"","label":"Benchmark","localized":"","hint":"Run benchmarks"}, {"id":"","label":"Models & Networks","localized":"","hint":"View lists of all available models and networks"}, - {"id":"","label":"Restore defaults","localized":"","hint":"Restore default user interface values"} + {"id":"","label":"Restore UI defaults","localized":"","hint":"Restore default user interface values"} ], "txt2img tab": [ {"id":"","label":"Sampling method","localized":"","hint":"Which algorithm to use to produce the image"}, {"id":"","label":"Steps","localized":"","hint":"How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results"}, {"id":"","label":"Tiling","localized":"","hint":"Produce an image that can be tiled"}, {"id":"","label":"full quality","localized":"","hint":"Use full quality VAE to decode latent samples"}, - {"id":"","label":"detailer","localized":"","hint":"Run processed image through additional detailer model"}, {"id":"","label":"hidiffusion","localized":"","hint":"HiDiffusion allows creation of high-resolution images using your standard models without duplicates/distortions and improved performance"}, {"id":"","label":"HDR Clamp","localized":"","hint":"Adjusts the level of nonsensical details by pruning values that deviate significantly from the distribution mean. It is particularly useful for enhancing generation at higher guidance scales, identifying outliers early in the process and applying mathematical adjustments based on the Range (Boundary) and Threshold settings. Think of it as setting the range within which you want your image values to be, and adjusting the threshold determines which values should be brought back into that range"}, {"id":"","label":"HDR Maximize","localized":"","hint":"Calculates a 'normalization factor' by dividing the maximum tensor value by the specified range multiplied by 4. This factor is then used to shift the channels within the given boundary, ensuring maximum dynamic range for subsequent processing. The objective is to optimize dynamic range for external applications like Photoshop, particularly for adjusting levels, contrast, and brightness"}, {"id":"","label":"Enable refine pass","localized":"","hint":"Use a similar process as image to image to upscale and/or add detail to the final image. Optionally uses refiner model to enhance image details."}, + {"id":"","label":"enable detailer pass","localized":"","hint":"Detect target objects such as face and reprocess it at higher resolution"}, {"id":"","label":"Denoising strength","localized":"","hint":"Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps slider specifies"}, {"id":"","label":"Denoise start","localized":"","hint":"Override denoise strength by stating how early base model should finish and when refiner should start. Only applicable to refiner usage. If set to 0 or 1, denoising strength will be used"}, {"id":"","label":"Hires steps","localized":"","hint":"Number of sampling steps for upscaled picture. If 0, uses same as for original"}, + {"id":"","label":"strength","localized":"","hint":"Denoising strength of during image operation controls how much of original image is allowed to change during generate"}, {"id":"","label":"Upscaler","localized":"","hint":"Which pre-trained model to use for the upscaling process."}, - {"id":"","label":"Upscale by","localized":"","hint":"Adjusts the size of the image by multiplying the original width and height by the selected value. Ignored if either Resize width to or Resize height to are non-zero"}, {"id":"","label":"Force Hires","localized":"","hint":"Hires runs automatically when Latent upscale is selected, but its skipped when using non-latent upscalers. Enable force hires to run hires with non-latent upscalers"}, - {"id":"","label":"Resize width to","localized":"","hint":"Resizes image to this width. If 0, width is inferred from either of two nearby sliders"}, - {"id":"","label":"Resize height to","localized":"","hint":"Resizes image to this height. If 0, height is inferred from either of two nearby sliders"}, + {"id":"","label":"Resize width","localized":"","hint":"Resizes image to this width. If 0, width is inferred from either of two nearby sliders"}, + {"id":"","label":"Resize height","localized":"","hint":"Resizes image to this height. If 0, height is inferred from either of two nearby sliders"}, {"id":"","label":"Refine sampler","localized":"","hint":"Use specific sampler as fallback sampler if primary is not supported for specific operation"}, {"id":"","label":"Refiner start","localized":"","hint":"Refiner pass will start when base model is this much complete (set to larger than 0 and smaller than 1 to run after full base model run)"}, {"id":"","label":"Refiner steps","localized":"","hint":"Number of steps to use for refiner pass"}, - {"id":"","label":"Refine CFG Scale","localized":"","hint":"CFG scale used for refiner pass"}, + {"id":"","label":"Refine guidance","localized":"","hint":"CFG scale used for refiner pass"}, + {"id":"","label":"Attention guidance","localized":"","hint":"CFG scale used for with PAG: Perturbed-Attention Guidance"}, + {"id":"","label":"Adaptive scaling","localized":"","hint":"Adaptive modifier for attention guidance scale"}, {"id":"","label":"Rescale guidance","localized":"","hint":"Rescale CFG generated noise to avoid overexposed images"}, {"id":"","label":"Refine Prompt","localized":"","hint":"Prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)"}, {"id":"","label":"Refine negative prompt","localized":"","hint":"Negative prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)"}, @@ -144,9 +140,8 @@ {"id":"","label":"Height","localized":"","hint":"Image height"}, {"id":"","label":"Batch count","localized":"","hint":"How many batches of images to create (has no impact on generation performance or VRAM usage)"}, {"id":"","label":"Batch size","localized":"","hint":"How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)"}, - {"id":"","label":"cfg scale","localized":"","hint":"Classifier Free Guidance scale: how strongly the image should conform to prompt. Lower values produce more creative results, higher values make it follow the prompt more strictly; recommended values between 5-10"}, + {"id":"","label":"guidance scale","localized":"","hint":"Classifier Free Guidance scale: how strongly the image should conform to prompt. Lower values produce more creative results, higher values make it follow the prompt more strictly; recommended values between 5-10"}, {"id":"","label":"Guidance End","localized":"","hint":"Ends the effect of CFG and PAG early: A value of 1 acts as normal, 0.5 stops guidance at 50% of steps"}, - {"id":"","label":"CLIP skip","localized":"","hint":"Clip skip is a feature that allows users to control the level of specificity of the prompt, the higher the CLIP skip value, the less deep the prompt will be interpreted. CLIP Skip 1 is typical while some anime models produce better results at CLIP skip 2"}, {"id":"","label":"Initial seed","localized":"","hint":"A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result"}, {"id":"","label":"Variation","localized":"","hint":"Second seed to be mixed with primary seed"}, {"id":"","label":"Variation strength","localized":"","hint":"How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed (except for ancestral samplers, where you will just get something)"}, @@ -154,12 +149,29 @@ {"id":"","label":"Resize seed from height","localized":"","hint":"Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution"}, {"id":"","label":"Override settings","localized":"","hint":"If you read in generation parameters through 'Process Image tab' and individual generation parameters should deviate from your system settings, this box will be populated with those settings to override your system configuration for this workflow"} ], +"detailer": [ + {"id":"","label":"detailer","localized":"","hint":"Run processed image through additional detailer model"}, + {"id":"","label":"detailer classes","localized":"","hint":"Specify specific classes to use if selected detailer model is a multi-class model"}, + {"id":"","label":"detailer models","localized":"","hint":"Select detection models to use for detailing"}, + {"id":"","label":"detailer negative prompt","localized":"","hint":"Use separate negative prompt for detailer. If not present, it will use primary negative prompt"}, + {"id":"","label":"detailer prompt","localized":"","hint":"Use separate prompt for detailer. If not present, it will use primary prompt"}, + {"id":"","label":"detailer steps","localized":"","hint":"Number of steps to run for detailer process"}, + {"id":"","label":"detailer strength","localized":"","hint":"Denoising strength of detailer process"}, + {"id":"","label":"detailer use model augment","localized":"","hint":"Run detailer detection models at extra precision"}, + {"id":"","label":"max detected","localized":"","hint":"Maximum number of detected objects to run detailer on"}, + {"id":"","label":"edge blur","localized":"","hint":"Blur edge of masked area by this percentage"}, + {"id":"","label":"edge padding","localized":"","hint":"Expand edge of masked area by this percentage"}, + {"id":"","label":"min confidence","localized":"","hint":"Minimum confidence in detected item"}, + {"id":"","label":"max overlap","localized":"","hint":"Maximum overlap between two detected items before one is discarded"}, + {"id":"","label":"min size","localized":"","hint":"Minimum size of detected object as percentage of overal image"}, + {"id":"","label":"max size","localized":"","hint":"Maximum size of detected object as percentage of overal image"} +], "img2img tab": [ {"id":"","label":"Fixed","localized":"","hint":"Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio"}, + {"id":"","label":"scale","localized":"","hint":"Resize image to target scale. If resize fixed width/height are set this option is ignored"}, {"id":"","label":"Crop","localized":"","hint":"Resize the image so that entirety of target resolution is filled with the image. Crop parts that stick out"}, {"id":"","label":"Fill","localized":"","hint":"Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors"}, {"id":"","label":"Mask blur","localized":"","hint":"How much to blur the mask before processing, in pixels"}, - {"id":"","label":"original","localized":"","hint":"keep whatever was there originally"}, {"id":"","label":"latent noise","localized":"","hint":"fill it with latent space noise"}, {"id":"","label":"latent nothing","localized":"","hint":"fill it with latent space zeroes"} ], @@ -190,23 +202,11 @@ {"id":"","label":"Number of ReBasin Iterations","localized":"","hint":"Number of times to merge and permute the model before saving"}, {"id":"","label":"cpu","localized":"","hint":"Uses cpu and RAM only: slowest but least likely to OOM"}, {"id":"","label":"shuffle","localized":"","hint":"Loads full model in RAM and calculates on VRAM: Less speedup, suggested for SDXL merges"}, - {"id":"","label":"cuda","localized":"","hint":"Loads models into VRAM automatically unloading current model: fastest option but unlikely to handle SDXL Models without OOM"}, - {"id":"","label":"Base","localized":"","hint":"Text Encoder and a few unaligned keys (1 value)"}, {"id":"","label":"In Blocks","localized":"","hint":"Downsampling Blocks of the UNet (12 values for SD1.5, 9 values for SDXL)"}, {"id":"","label":"Mid Block","localized":"","hint":"Central Block of the UNet (1 value)"}, {"id":"","label":"Out Block","localized":"","hint":"Upsampling Blocks of the UNet (12 values for SD1.5, 9 values for SDXL)"}, {"id":"","label":"Preset Interpolation Ratio","localized":"","hint":"If two presets are selected, interpolate between them"} ], -"train tab": [ - {"id":"","label":"Initialization text","localized":"","hint":"If the number of tokens is more than the number of vectors, some may be skipped.\nLeave the textbox empty to start with zeroed out vectors"}, - {"id":"","label":"Select activation function of hypernetwork","localized":"","hint":"Recommended : Swish / Linear(none)"}, - {"id":"","label":"Select Layer weights initialization","localized":"","hint":"Recommended: Kaiming for relu-like, Xavier for sigmoid-like, Normal otherwise"}, - {"id":"","label":"Enter hypernetwork Dropout structure","localized":"","hint":"Recommended : leave empty or 0~0.35 incrementing sequence: 0, 0.05, 0.15"}, - {"id":"","label":"Create interim images","localized":"","hint":"Save an image to log directory every N steps, 0 to disable"}, - {"id":"","label":"Create interim embeddings","localized":"","hint":"Save a copy of embedding to log directory every N steps, 0 to disable"}, - {"id":"","label":"Use current settings for previews","localized":"","hint":"Read parameters (prompt, etc...) from txt2img tab when making previews"}, - {"id":"","label":"Shuffle tags","localized":"","hint":"Shuffle tags by ',' when creating prompts"} -], "settings menu": [ {"id":"settings_submit","label":"Apply settings","localized":"","hint":"Save current settings, server restart is recommended"}, {"id":"restart_submit","label":"Restart server","localized":"","hint":"Restart server"}, @@ -217,47 +217,43 @@ {"id":"sett_reload_sd_model","label":"Reload model","localized":"","hint":"Reload currently selected model"} ], "settings sections": [ - {"id":"","label":"Execution & Models","localized":"","hint":"Settings related to execution backend, models, and prompt attention"}, - {"id":"","label":"Compute Settings","localized":"","hint":"Settings related to precision, cross attention, model compilation, and optimizations for computing platforms"}, - {"id":"","label":"Inference Settings","localized":"","hint":"Settings related image inference, token merging, FreeU, and Hypertile"}, - {"id":"","label":"Diffusers Settings","localized":"","hint":"Settings related to Diffusers backend"}, + {"id":"","label":"Models & Loading","localized":"","hint":"Settings related to base models, primary backend and model load behavior"}, + {"id":"","label":"Variable Auto Encoder","localized":"","hint":"Settings related to variable auto encoder and image decoding process during generate"}, + {"id":"","label":"Text encoder","localized":"","hint":"Settings related to text encoder and prompt encoding processing during generate"}, + {"id":"","label":"Compute Settings","localized":"","hint":"Settings related to compute precision, cross attention, and optimizations for computing platforms"}, + {"id":"","label":"Backend Settings","localized":"","hint":"Settings related to compute backends: torch, onnx and olive"}, + {"id":"","label":"Quantization Settings","localized":"","hint":"Settings related to model quantization"}, + {"id":"","label":"Pipeline modifiers","localized":"","hint":"Additional functionality that can be enabled during generate"}, + {"id":"","label":"Model compile","localized":"","hint":"Settings related to different model compilation methods"}, {"id":"","label":"System Paths","localized":"","hint":"Settings related to location of various model directories"}, {"id":"","label":"Image Options","localized":"","hint":"Settings related to image format, metadata, and image grids"}, - {"id":"","label":"image naming & paths","localized":"","hint":"Settings related to image filenames, and output directories"}, - {"id":"","label":"User Interface","localized":"","hint":"Settings related to user interface themes, and Quicksettings list"}, - {"id":"","label":"Live Previews","localized":"","hint":"Settings related to live previews, audio notification, and log view"}, + {"id":"","label":"image Paths","localized":"","hint":"Settings related to image filenames, and output directories"}, + {"id":"","label":"Live Previews","localized":"","hint":"Settings related to live previews, audio notification"}, {"id":"","label":"Sampler Settings","localized":"","hint":"Settings related to sampler selection and configuration, and diffuser specific sampler configuration"}, {"id":"","label":"Postprocessing","localized":"","hint":"Settings related to post image generation processing, face restoration, and upscaling"}, {"id":"","label":"Control Options","localized":"","hint":"Settings related the Control tab"}, - {"id":"","label":"Training","localized":"","hint":"Settings related to model training configuration and directories"}, - {"id":"","label":"Interrogate","localized":"","hint":"Settings related to interrogation configuration"}, - {"id":"","label":"Networks","localized":"","hint":"Settings related to networks user interface, networks multiplier defaults, and configuration"}, - {"id":"","label":"Licenses","localized":"","hint":"View licenses of all additional included libraries"}, + {"id":"","label":"Huggingface","localized":"","hint":"Settings related huggingface access"}, {"id":"","label":"Show all pages","localized":"","hint":"Show all settings pages"} ], "settings": [ {"id":"","label":"base model","localized":"","hint":"Main model used for all operations"}, {"id":"","label":"refiner model","localized":"","hint":"Refiner model used for second-pass operations"}, {"id":"","label":"Cached models","localized":"","hint":"The number of models to store in RAM for quick access"}, - {"id":"","label":"Cached VAEs","localized":"","hint":"The number of VAE files to store in RAM for quick access"}, {"id":"","label":"VAE model","localized":"","hint":"VAE helps with fine details in the final image and may also alter colors"}, - {"id":"","label":"Load models using stream loading method","localized":"","hint":"When loading models attempt stream loading optimized for slow or network storage"}, + {"id":"","label":"Model load using streams","localized":"","hint":"When loading models attempt stream loading optimized for slow or network storage"}, {"id":"","label":"xFormers","localized":"","hint":"Memory optimization. Non-Deterministic (different results each time)"}, {"id":"","label":"Scaled-Dot-Product","localized":"","hint":"Memory optimization. Non-Deterministic unless SDP memory attention is disabled."}, {"id":"","label":"Prompt padding","localized":"","hint":"Increase coherency by padding from the last comma within n tokens when using more than 75 tokens"}, {"id":"","label":"Original","localized":"","hint":"Original LDM backend"}, - {"id":"","label":"Diffusers","localized":"","hint":"Diffusers backend"}, {"id":"","label":"Autocast","localized":"","hint":"Automatically determine precision during runtime"}, {"id":"","label":"Full","localized":"","hint":"Always use full precision"}, {"id":"","label":"FP32","localized":"","hint":"Use 32-bit floating point precision for calculations"}, {"id":"","label":"FP16","localized":"","hint":"Use 16-bit floating point precision for calculations"}, {"id":"","label":"BF16","localized":"","hint":"Use modified 16-bit floating point precision for calculations"}, - {"id":"","label":"Full precision for model (--no-half)","localized":"","hint":"Uses FP32 for the model. May produce better results while using more VRAM and slower generation"}, - {"id":"","label":"Full precision for VAE (--no-half-vae)","localized":"","hint":"Uses FP32 for the VAE. May produce better results while using more VRAM and slower generation"}, + {"id":"","label":"Full precision (--no-half-vae)","localized":"","hint":"Uses FP32 for the VAE. May produce better results while using more VRAM and slower generation"}, + {"id":"","label":"Force full precision (--no-half)","localized":"","hint":"Uses FP32 for the model. May produce better results while using more VRAM and slower generation"}, {"id":"","label":"Upcast sampling","localized":"","hint":"Usually produces similar results to --no-half with better performance while using less memory"}, {"id":"","label":"Attempt VAE roll back for NaN values","localized":"","hint":"Requires Torch 2.1 and NaN check enabled"}, - {"id":"","label":"DirectML memory stats provider","localized":"","hint":"How to get GPU memory stats"}, - {"id":"","label":"DirectML retry ops for NaN","localized":"","hint":"Retry specific operations if their output was NaN. This may make your generation slower"}, {"id":"","label":"Olive use FP16 on optimization","localized":"","hint":"Use 16-bit floating point precision for the output model of Olive optimization process. Use 32-bit floating point precision if disabled"}, {"id":"","label":"Olive force FP32 for VAE Encoder","localized":"","hint":"Use 32-bit floating point precision for VAE Encoder of the output model. This overrides 'use FP16 on optimization' option. If you are getting NaN or black blank images from Img2Img, enable this option and remove cache"}, {"id":"","label":"Olive use static dimensions","localized":"","hint":"Make the inference with Olive optimized models much faster. (OrtTransformersOptimization)"}, @@ -266,7 +262,6 @@ {"id":"","label":"Include metadata","localized":"","hint":"Save image create parameters as metadata tags inside image file"}, {"id":"","label":"Images filename pattern","localized":"","hint":"Use following tags to define how filenames for images are chosen:
seq, uuid
date, datetime, job_timestamp
generation_number, batch_number
model, model_shortname
model_hash, model_name
sampler, seed, steps, cfg
clip_skip, denoising
hasprompt, prompt, styles
prompt_hash, prompt_no_styles
prompt_spaces, prompt_words
height, width, image_hash
"}, {"id":"","label":"Row count","localized":"","hint":"Use -1 for autodetect and 0 for it to be same as batch size"}, - {"id":"","label":"Update JSON log file per image","localized":"","hint":"Save image information to a JSON file"}, {"id":"","label":"Directory name pattern","localized":"","hint":"Use following tags to define how subdirectories for images and grids are chosen: [steps], [cfg],[prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime], [datetime