diff --git a/.eslintrc.json b/.eslintrc.json index 2958fbc79..e34b2792c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -51,13 +51,14 @@ "globals": { //script.js "gradioApp": "readonly", + "executeCallbacks": "readonly", + "onAfterUiUpdate": "readonly", + "onOptionsChanged": "readonly", "onUiLoaded": "readonly", "onUiUpdate": "readonly", - "onOptionsChanged": "readonly", "uiCurrentTab": "writable", "uiElementIsVisible": "readonly", "uiElementInSight": "readonly", - "executeCallbacks": "readonly", //ui.js "opts": "writable", "all_gallery_buttons": "readonly", diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index add464bca..9347c4bf6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -28,7 +28,7 @@ body: - type: markdown attributes: value: | - If issue is setup, installation or startup related, please check `webui.log` before reporting + If issue is setup, installation or startup related, please check `sdnext.log` before reporting And when posting console logs, please use code blocks ( \`\`\` ) to format them insead of uploading screenshots - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/extension_report.yml b/.github/ISSUE_TEMPLATE/extension_report.yml index 21e95688a..88c590307 100644 --- a/.github/ISSUE_TEMPLATE/extension_report.yml +++ b/.github/ISSUE_TEMPLATE/extension_report.yml @@ -22,6 +22,12 @@ body: label: URL link of the extension description: URL link of the extension value: + - type: textarea + id: url + attributes: + label: URL link of the issue reported in the extension repository + description: Any extension related issue must also be reported to extension repository as well + value: - type: markdown attributes: value: | @@ -29,5 +35,5 @@ body: - type: markdown attributes: value: | - If issue is extension installation or startup related, please check `webui.log` before reporting + If issue is extension installation or startup related, please check `sdnext.log` before reporting And when posting console logs, please use code blocks ( \`\`\` ) to format them insead of uploading screenshots diff --git a/CHANGELOG.md b/CHANGELOG.md index fbeb78785..afc7a8fcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,34 @@ # Change Log for SD.Next -## Update for 06/03/2023 +## Update for 06/07/2023 + +- reworked **installer** sequence + as some extensions are loading packages directly from their preload sequence + which was preventing some optimizations to take effect + i hope this does not cause regressions, but if it does, please report +- experimental `sd_model_dict` setting which allows you to load model dictionary + from one model and apply weights from another model specified in `sd_model_checkpoint` + results? who am i to judge :) + +## Update for 06/05/2023 + +Few new features and extra handling for broken extensions +that caused my phone to go crazy with notifications over the weekend... + +- added extra networks to **xyz grid** options + now you can have more fun with all your embeddings and loras :) +- new **vae decode** method to help with larger batch sizes, thanks @bigdog +- new setting -> lora -> **use lycoris to handle all lora types** + this is still experimental, but the goal is to obsolete old built-in lora module + as it doesn't understand many new loras and built-in lyco module can handle it all +- somewhat optimize browser page loading + still slower than i'd want, but gradio is pretty bad at this +- profiling of scripts/extensions callbacks + you can now see how much or pre/post processing is done, not just how long generate takes +- additional exception handling so bad exception does not crash main app +- additional background removal models +- some work on bfloat16 which nobody really should be using, but why not 🙂 -- new vae decode method to help with larger batch sizes, thanks @bigdog -- profiling of scripts/extensions callbacks -- additional exception handling so bad exception does not crash main app -- additional background removal models ## Update for 06/02/2023 diff --git a/README.md b/README.md index 6b06f20df..c400a63f3 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,13 @@ Individual features are not listed here, instead check [Changelog](CHANGELOG.md) 3. Run launcher `webui.bat` or `webui.sh`: - Platform specific wrapper scripts For Windows, Linux and OSX - - Starts `launch.py` in a Python virtual environment (`venv`) + - Starts `sdnext.py` in a Python virtual environment (`venv`) - Uses `install.py` to handle all actual requirements and dependencies - *Note*: Server can run without virtual environment, but it is recommended to use it to avoid library version conflicts with other applications *Note*: **nVidia/CUDA** and **AMD/ROCm** are auto-detected is present and available, but for any other use case specify required parameter explicitly or wrong packages may be installed as installer will assume CPU-only environment -Full startup sequence is logged in `webui.log`, so if you encounter any issues, please check it first +Full startup sequence is logged in `sdnext.log`, so if you encounter any issues, please check it first Below is partial list of all available parameters, run `webui --help` for the full list: diff --git a/TODO.md b/TODO.md index e543fe3b6..8c450f503 100644 --- a/TODO.md +++ b/TODO.md @@ -42,6 +42,7 @@ Tech that can be integrated as part of the core workflow... - [Custom diffusion](https://github.com/guaneec/custom-diffusion-webui), [Custom diffusion](https://www.cs.cmu.edu/~custom-diffusion/) - [Dream artist](https://github.com/7eu7d7/DreamArtist-sd-webui-extension) - [QuickEmbedding](https://github.com/ethansmith2000/QuickEmbedding) +- [DataComp CLiP](https://github.com/mlfoundations/open_clip/blob/main/docs/datacomp_models.md) - `TensorRT` ## Random @@ -56,3 +57,5 @@ Tech that can be integrated as part of the core workflow... - docker - port `p.all_hr_prompts` - test `lyco_patch_lora` +- fix `lyco` logging +- git diff index diff --git a/cli/hfsearch.py b/cli/hf-search.py old mode 100644 new mode 100755 similarity index 96% rename from cli/hfsearch.py rename to cli/hf-search.py index b0fc9040c..bbb4a4f0f --- a/cli/hfsearch.py +++ b/cli/hf-search.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import sys import huggingface_hub as hf from rich import print # pylint: disable=redefined-builtin diff --git a/cli/image-exif.py b/cli/image-exif.py new file mode 100755 index 000000000..8531ef687 --- /dev/null +++ b/cli/image-exif.py @@ -0,0 +1,106 @@ +#!/bin/env python + +import os +import io +import re +import sys +import json +from PIL import Image, ExifTags, TiffImagePlugin, PngImagePlugin +from rich import print # pylint: disable=redefined-builtin + +# warnings.filterwarnings("ignore", category=UserWarning) + + +class Exif: # pylint: disable=single-string-used-for-slots + __slots__ = ('__dict__') # pylint: disable=superfluous-parens + def __init__(self, image = None): + super(Exif, self).__setattr__('exif', Image.Exif()) + self.pnginfo = PngImagePlugin.PngInfo() + self.tags = {**dict(((k, v) for k, v in ExifTags.TAGS.items())), **dict(((k, v) for k, v in ExifTags.GPSTAGS.items()))} + self.ids = {**dict(((v, k) for k, v in ExifTags.TAGS.items())), **dict(((v, k) for k, v in ExifTags.GPSTAGS.items()))} + if image is not None: + self.load(image) + + def __getattr__(self, attr): + if attr in self.__dict__: + return self.__dict__[attr] + return self.exif.get(attr, None) + + def load(self, img: Image): + img.load() # exif may not be ready + exif_dict = {} + try: + exif_dict = dict(img._getexif().items()) # pylint: disable=protected-access + except: + exif_dict = dict(img.info.items()) + for key, val in exif_dict.items(): + if isinstance(val, bytes): # decode bytestring + val = self.decode(val) + if val is not None: + if isinstance(key, str): + self.exif[key] = val + self.pnginfo.add_text(key, str(val), zip=False) + elif isinstance(key, int) and key in ExifTags.TAGS: # add known tags + if self.tags[key] in ['ExifOffset']: + continue + self.exif[self.tags[key]] = val + self.pnginfo.add_text(self.tags[key], str(val), zip=False) + # if self.tags[key] == 'UserComment': # add geninfo from UserComment + # self.geninfo = val + else: + print('metadata unknown tag:', key, val) + for key, val in self.exif.items(): + if isinstance(val, bytes): # decode bytestring + self.exif[key] = self.decode(val) + + def decode(self, s: bytes): + remove_prefix = lambda text, prefix: text[len(prefix):] if text.startswith(prefix) else text # pylint: disable=unnecessary-lambda-assignment + for encoding in ['utf-8', 'utf-16', 'ascii', 'latin_1', 'cp1252', 'cp437']: # try different encodings + try: + s = remove_prefix(s, b'UNICODE') + s = remove_prefix(s, b'ASCII') + s = remove_prefix(s, b'\x00') + val = s.decode(encoding, errors="strict") + val = re.sub(r'[\x00-\x09]', '', val).strip() # remove remaining special characters + if len(val) == 0: # remove empty strings + val = None + return val + except: + pass + return None + + def get_bytes(self): + ifd = TiffImagePlugin.ImageFileDirectory_v2() + exif_stream = io.BytesIO() + for key, val in self.exif.items(): + if key in self.ids: + ifd[self.ids[key]] = val + else: + print('metadata unknown exif tag:', key, val) + ifd.save(exif_stream) + raw = b'Exif\x00\x00' + exif_stream.getvalue() + return raw + + +def read_exif(filename: str): + try: + img = Image.open(filename) + exif = Exif(img) + print('image:', filename, 'format:', img.format, 'metadata:', json.dumps(vars(exif.exif)['_data'], indent=2)) + except Exception as e: + print('metadata error reading:', filename, e) + # exif.exif['Software'] = 'This is a Test' + # img.save('input-scored.jpg', exif=exif.bytes()) + + +if __name__ == '__main__': + sys.argv.pop(0) + if len(sys.argv) == 0: + print('metadata:', 'no files specified') + for fn in sys.argv: + if os.path.isfile(fn): + read_exif(fn) + elif os.path.isdir(fn): + for root, dirs, files in os.walk(fn): + for file in files: + read_exif(os.path.join(root, file)) diff --git a/cli/train.py b/cli/train.py index 8ee5a675e..8b2d1287d 100755 --- a/cli/train.py +++ b/cli/train.py @@ -87,6 +87,10 @@ def parse_args(): global args # pylint: disable=global-statement parser = argparse.ArgumentParser(description = 'SD.Next Train') + + group_server = parser.add_argument_group('Server') + group_server.add_argument('--server', type=str, default='http://127.0.0.1:7860', required=False, help='server url, default: %(default)s') + group_main = parser.add_argument_group('Main') group_main.add_argument('--type', type=str, choices=['embedding', 'ti', 'lora', 'lyco', 'dreambooth', 'hypernetwork'], default=None, required=True, help='training type') group_main.add_argument('--model', type=str, default='', required=False, help='base model to use for training, default: current loaded model') @@ -95,7 +99,7 @@ def parse_args(): group_data = parser.add_argument_group('Dataset') group_data.add_argument('--input', type=str, default=None, required=True, help='input folder with training images') - group_data.add_argument('--output', type=str, default='', required=False, help='where to store processed images, default is system temp/train') + group_data.add_argument('--interim', type=str, default='', required=False, help='where to store processed images, default is system temp/train') group_data.add_argument('--process', type=str, default='original,interrogate,resize,square', required=False, help=f'list of possible processing steps: {valid_steps}, default: %(default)s') group_train = parser.add_argument_group('Train') @@ -164,9 +168,9 @@ def verify_args(): if not os.path.isfile(args.model): log.error(f'cannot find loaded model: {args.model}') exit(1) - if not os.path.exists(args.ckpt_dir) or not os.path.isdir(args.ckpt_dir): - log.error(f'cannot find models folder: {args.ckpt_dir}') - exit(1) + # if not os.path.exists(args.ckpt_dir) or not os.path.isdir(args.ckpt_dir): + # log.error(f'cannot find models folder: {args.ckpt_dir}') + # exit(1) if not os.path.exists(args.input) or not os.path.isdir(args.input): log.error(f'cannot find training folder: {args.input}') exit(1) @@ -176,8 +180,8 @@ def verify_args(): if not os.path.exists(args.lyco_dir) or not os.path.isdir(args.lyco_dir): log.error(f'cannot find lyco folder: {args.lyco_dir}') exit(1) - if args.output != '': - args.process_dir = args.output + if args.interim != '': + args.process_dir = args.interim else: args.process_dir = os.path.join(tempfile.gettempdir(), 'train', args.name) log.debug(f'args: {vars(args)}') @@ -376,6 +380,7 @@ def process_inputs(): if __name__ == '__main__': log.info('SD.Next train script') parse_args() + sdapi.sd_url = args.server setup_logging() prepare_server() verify_args() diff --git a/cli/validate-locale.py b/cli/validate-locale.py new file mode 100755 index 000000000..45841b7a3 --- /dev/null +++ b/cli/validate-locale.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import sys +import json +from rich import print # pylint: disable=redefined-builtin + +if __name__ == "__main__": + sys.argv.pop(0) + fn = sys.argv[0] if len(sys.argv) > 0 else 'locale_en.json' + with open(fn, 'r') as f: + data = json.load(f) + keys = [] + t_names = 0 + t_hints = 0 + for k in data.keys(): + print(f'Section: {k}') + names = len(data[k]) + t_names += names + print(f' Names: {names}') + hints = len([k for k in data[k] if k["hint"] != ""]) + t_hints += hints + print(f' Hints: {hints}') + print(f' Missing: {names - hints}') + for v in data[k]: + if v['text'] in keys: + print(f' Duplicate: {k}.{v["text"]}') + else: + keys.append(v['text']) + print(f'Total entries: {t_names}') + print(f'Total hints: {t_hints}') + print(f'Total missing: {t_names - t_hints}') diff --git a/extensions-builtin/Lora/ui_extra_networks_lora.py b/extensions-builtin/Lora/ui_extra_networks_lora.py index 259e99ac8..8cbcbe9d3 100644 --- a/extensions-builtin/Lora/ui_extra_networks_lora.py +++ b/extensions-builtin/Lora/ui_extra_networks_lora.py @@ -14,21 +14,22 @@ class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage): def list_items(self): for name, lora_on_disk in lora.available_loras.items(): - path, ext = os.path.splitext(lora_on_disk.filename) - + path, _ext = os.path.splitext(lora_on_disk.filename) alias = lora_on_disk.get_alias() - yield { "name": name, "filename": path, "preview": self.find_preview(path), "description": self.find_description(path), "search_term": self.search_terms_from_path(lora_on_disk.filename), - "prompt": json.dumps(f""), + "prompt": ( + json.dumps(f"") + ), "local_preview": f"{path}.{shared.opts.samples_format}", "metadata": json.dumps(lora_on_disk.metadata, indent=4) if lora_on_disk.metadata else None, } def allowed_directories_for_previews(self): return [shared.cmd_opts.lora_dir] - diff --git a/extensions-builtin/SwinIR/scripts/swinir_model.py b/extensions-builtin/SwinIR/scripts/swinir_model.py index 1c7bf325e..085c2ecc3 100644 --- a/extensions-builtin/SwinIR/scripts/swinir_model.py +++ b/extensions-builtin/SwinIR/scripts/swinir_model.py @@ -1,15 +1,13 @@ import os - import numpy as np import torch from PIL import Image from basicsr.utils.download_util import load_file_from_url -from tqdm import tqdm - -from modules import modelloader, devices, script_callbacks, shared -from modules.shared import opts, state +from tqdm.rich import tqdm from swinir_model_arch import SwinIR as net from swinir_model_arch_v2 import Swin2SR as net2 +from modules import modelloader, devices, script_callbacks, shared +from modules.shared import opts, state from modules.upscaler import Upscaler, UpscalerData @@ -36,8 +34,8 @@ class UpscalerSwinIR(Upscaler): scalers.append(model_data) self.scalers = scalers - def do_upscale(self, img, model_file): - model = self.load_model(model_file) + def do_upscale(self, img, selected_model): + model = self.load_model(selected_model) if model is None: return img model = model.to(device_swinir, dtype=devices.dtype) @@ -56,8 +54,7 @@ class UpscalerSwinIR(Upscaler): filename = path if filename is None or not os.path.exists(filename): return None - if filename.endswith(".v2.pth"): - model = net2( + model_v2 = net2( upscale=scale, in_chans=3, img_size=64, @@ -69,29 +66,33 @@ class UpscalerSwinIR(Upscaler): mlp_ratio=2, upsampler="nearest+conv", resi_connection="1conv", - ) - params = None - else: - model = net( - upscale=scale, - in_chans=3, - img_size=64, - window_size=8, - img_range=1.0, - depths=[6, 6, 6, 6, 6, 6, 6, 6, 6], - embed_dim=240, - num_heads=[8, 8, 8, 8, 8, 8, 8, 8, 8], - mlp_ratio=2, - upsampler="nearest+conv", - resi_connection="3conv", - ) - params = "params_ema" - + ) + model_v1 = net( + upscale=scale, + in_chans=3, + img_size=64, + window_size=8, + img_range=1.0, + depths=[6, 6, 6, 6, 6, 6, 6, 6, 6], + embed_dim=240, + num_heads=[8, 8, 8, 8, 8, 8, 8, 8, 8], + mlp_ratio=2, + upsampler="nearest+conv", + resi_connection="3conv", + ) pretrained_model = torch.load(filename) - if params is not None: - model.load_state_dict(pretrained_model[params], strict=True) - else: - model.load_state_dict(pretrained_model, strict=True) + for model in [model_v1, model_v2]: + for param in ["params_ema", "params", None]: + try: + if param is not None: + model.load_state_dict(pretrained_model[param], strict=True) + else: + model.load_state_dict(pretrained_model, strict=True) + shared.log.info(f'Loaded SwinIR model: {filename} param={param}') + return model + except Exception: + pass + shared.log.error(f'Could not determine SwinIR model parameters: {filename}') return model @@ -142,7 +143,7 @@ def inference(img, model, tile, tile_overlap, window_size, scale): E = torch.zeros(b, c, h * sf, w * sf, dtype=devices.dtype, device=device_swinir).type_as(img) W = torch.zeros_like(E, dtype=devices.dtype, device=device_swinir) - with tqdm(total=len(h_idx_list) * len(w_idx_list), desc="SwinIR tiles") as pbar: + with tqdm(total=len(h_idx_list) * len(w_idx_list), desc="Upscaling SwinIR") as pbar: for h_idx in h_idx_list: if state.interrupted or state.skipped: break diff --git a/extensions-builtin/a1111-sd-webui-lycoris b/extensions-builtin/a1111-sd-webui-lycoris index 21e9ea0f5..123d1da15 160000 --- a/extensions-builtin/a1111-sd-webui-lycoris +++ b/extensions-builtin/a1111-sd-webui-lycoris @@ -1 +1 @@ -Subproject commit 21e9ea0f58dfdbee12b08389fd2cd1aa545e058d +Subproject commit 123d1da15d802823480f8020312ce449523f10e2 diff --git a/extensions-builtin/sd-webui-agent-scheduler b/extensions-builtin/sd-webui-agent-scheduler index b07031958..45dfe5977 160000 --- a/extensions-builtin/sd-webui-agent-scheduler +++ b/extensions-builtin/sd-webui-agent-scheduler @@ -1 +1 @@ -Subproject commit b0703195833b8ea055e07b80902cbda1a01363f6 +Subproject commit 45dfe5977ea43a14f61f46d572615efe169ca2be diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index d8551e447..2598ca9e7 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit d8551e447d8718e15b8ff5de04036d3fd1b3c5ce +Subproject commit 2598ca9e78f167014c6556cb89dab792a745749f diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 5795886be..b2f6e4cbe 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 5795886bee895c2e69e5c64e67aa643da423511c +Subproject commit b2f6e4cbe507078e3bf2b9d5fce6f83e2e233aa8 diff --git a/html/locale_en.json b/html/locale_en.json new file mode 100755 index 000000000..97572b593 --- /dev/null +++ b/html/locale_en.json @@ -0,0 +1,565 @@ +{ "icons": [ + {"id":"","label":"📘","localized":"","hint":"Read generation parameters from prompt or last generation if prompt is empty into user interface"}, + {"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":"Save style"}, + {"id":"","label":"🔄","localized":"","hint":"Refresh"}, + {"id":"","label":"❌","localized":"","hint":"Close"}, + {"id":"","label":"📒","localized":"","hint":"Fill"}, + {"id":"","label":"🎲️","localized":"","hint":"Use random seed"}, + {"id":"","label":"♻️","localized":"","hint":"Reuse previous seed"}, + {"id":"","label":"⇅","localized":"","hint":"Switch values"} + ], + "prompts": [ + {"id":"","label":"Prompt","localized":"","hint":"Prompt"}, + {"id":"","label":"Negative prompt","localized":"","hint":"Negative Prompt"} + ], + "tabs": [ + {"id":"","label":"From Text ","localized":"txt2img","hint":"Create image from text"}, + {"id":"","label":"From Image ","localized":"","hint":"Create image from image"}, + {"id":"","label":"Process Image ","localized":"","hint":"Process existing image"}, + {"id":"","label":"Train ","localized":"","hint":"Run training or model merging"}, + {"id":"","label":"Settings ","localized":"","hint":"Application settings"}, + {"id":"","label":"Extensions ","localized":"","hint":"Application extensions"} + ], + "action panel": [ + {"id":"","label":"Generate","localized":"","hint":"Start processing"}, + {"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":"Interrogate\nCLIP","localized":"","hint":"Run interrogate using CLIP model"}, + {"id":"","label":"Interrogate\nDeepBooru","localized":"","hint":"Run interrogate using DeepBooru model"} + ], + "extra networks": [ + {"id":"","label":"Save preview","localized":"","hint":"Save current image as extra network preview"}, + {"id":"","label":"Save description","localized":"","hint":"Save current text as extra network description"}, + {"id":"","label":"Read description","localized":"","hint":"Read stored extra network description"} + ], + "gallery buttons": [ + {"id":"","label":"show","localized":"","hint":"Show image location"}, + {"id":"","label":"save","localized":"","hint":"Save image"}, + {"id":"","label":"zip","localized":"","hint":"Create zip archive from images"}, + {"id":"","label":"delete","localized":"","hint":"Delete image"}, + {"id":"","label":"➠ text","localized":"","hint":"Transfer image to text interface"}, + {"id":"","label":"➠ image","localized":"","hint":"Transfer image to image interface"}, + {"id":"","label":"➠ inpaint","localized":"","hint":"Transfer image to inpaint interface"}, + {"id":"","label":"➠ sketch","localized":"","hint":"Transfer image to sketch interface"}, + {"id":"","label":"➠ inpaint sketch","localized":"","hint":"Transfer image to inpaint sketch interface"}, + {"id":"","label":"➠ process","localized":"","hint":"Transfer image to process interface"} + ], + "extensions": [ + {"id":"","label":"Install","localized":"","hint":""}, + {"id":"","label":"Search","localized":"","hint":""}, + {"id":"","label":"Sort by","localized":"","hint":""}, + {"id":"","label":"Manage Extensions ","localized":"","hint":""}, + {"id":"","label":"Manual install ","localized":"","hint":""}, + {"id":"","label":"Extension GIT repository URL","localized":"","hint":""}, + {"id":"","label":"Specific branch name","localized":"","hint":""}, + {"id":"","label":"Local directory name","localized":"","hint":""}, + {"id":"","label":"Refresh extension list","localized":"","hint":""}, + {"id":"","label":"Update installed extensions","localized":"","hint":""}, + {"id":"","label":"Apply changes & restart server","localized":"","hint":""} + ], + "txt2img tab": [ + {"id":"","label":"Sampling method","localized":"","hint":"Which algorithm to use to produce the image"}, + {"id":"","label":"Sampling 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":"Restore faces","localized":"","hint":""}, + {"id":"","label":"Tiling","localized":"","hint":"Produce an image that can be tiled"}, + {"id":"","label":"Hires fix","localized":"","hint":""}, + {"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":"Hires steps","localized":"","hint":"Number of sampling steps for upscaled picture. If 0, uses same as for original"}, + {"id":"","label":"Upscaler","localized":"","hint":""}, + {"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":"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":"Width","localized":"","hint":""}, + {"id":"","label":"Height","localized":"","hint":""}, + {"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"}, + {"id":"","label":"CLIP skip","localized":"","hint":""}, + {"id":"","label":"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":"Extra","localized":"","hint":""}, + {"id":"","label":"Variation seed","localized":"","hint":"Seed of a different picture to be mixed into the generation"}, + {"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)"}, + {"id":"","label":"Resize seed from width","localized":"","hint":"Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution"}, + {"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":""} + ], + "process tab": [ + {"id":"","label":"Single Image ","localized":"","hint":""}, + {"id":"","label":"Process Batch ","localized":"","hint":""}, + {"id":"","label":"Process Folder ","localized":"","hint":""}, + {"id":"","label":"Scale by ","localized":"","hint":""}, + {"id":"","label":"Scale to ","localized":"","hint":""}, + {"id":"","label":"Input directory","localized":"","hint":""}, + {"id":"","label":"Output directory","localized":"","hint":""}, + {"id":"","label":"Show result images","localized":"","hint":""}, + {"id":"","label":"Resize","localized":"","hint":""}, + {"id":"","label":"Crop to fit","localized":"","hint":""}, + {"id":"","label":"Secondary Upscaler","localized":"","hint":""}, + {"id":"","label":"Upscaler 2 visibility","localized":"","hint":""}, + {"id":"","label":"GFPGAN visibility","localized":"","hint":""}, + {"id":"","label":"CodeFormer visibility","localized":"","hint":""}, + {"id":"","label":"CodeFormer weight (0 = max, 1 = min)","localized":"","hint":""} + ], + "settings menu": [ + {"id":"settings_submit","label":"Apply settings","localized":"","hint":""}, + {"id":"restart_submit","label":"Restart server","localized":"","hint":""}, + {"id":"shutdown_submit","label":"Shutdown server","localized":"","hint":""}, + {"id":"settings_preview_theme","label":"Preview theme","localized":"","hint":""}, + {"id":"defaults_submit","label":"Restore defaults","localized":"","hint":""}, + {"id":"sett_unload_sd_model","label":"Unload checkpoint","localized":"","hint":""}, + {"id":"sett_reload_sd_model","label":"Reload checkpoint","localized":"","hint":""} + ], + "settings sections": [ + {"id":"","label":"Stable Diffusion ","localized":"","hint":""}, + {"id":"","label":"Compute Settings ","localized":"","hint":""}, + {"id":"","label":"System Paths ","localized":"","hint":""}, + {"id":"","label":"Image Options ","localized":"","hint":""}, + {"id":"","label":"Image Processing ","localized":"","hint":""}, + {"id":"","label":"Output Paths ","localized":"","hint":""}, + {"id":"","label":"User interface ","localized":"","hint":""}, + {"id":"","label":"Live previews ","localized":"","hint":""}, + {"id":"","label":"Sampler Settings ","localized":"","hint":""}, + {"id":"","label":"Postprocessing ","localized":"","hint":""}, + {"id":"","label":"Training ","localized":"","hint":""}, + {"id":"","label":"Interrogate ","localized":"","hint":""}, + {"id":"","label":"Upscaling ","localized":"","hint":""}, + {"id":"","label":"Lora ","localized":"","hint":""}, + {"id":"","label":"Face restoration ","localized":"","hint":""}, + {"id":"","label":"Extra Networks ","localized":"","hint":""}, + {"id":"","label":"Token Merging ","localized":"","hint":""}, + {"id":"","label":"Licenses ","localized":"","hint":""}, + {"id":"","label":"Show all pages","localized":"","hint":""}, + {"id":"","label":"Request browser notifications","localized":"","hint":""} + ], + "img2img tabs": [ + {"id":"","label":"Image ","localized":"","hint":""}, + {"id":"","label":"Sketch ","localized":"","hint":""}, + {"id":"","label":"Inpaint ","localized":"","hint":""}, + {"id":"","label":"Inpaint sketch ","localized":"","hint":""}, + {"id":"","label":"Inpaint upload ","localized":"","hint":""}, + {"id":"","label":"Batch ","localized":"","hint":""} + ], + "img2img tab": [ + {"id":"","label":"Inpaint Batch input directory","localized":"","hint":""}, + {"id":"","label":"Inpaint Batch output directory","localized":"","hint":""}, + {"id":"","label":"Inpaint batch mask directory","localized":"","hint":""}, + {"id":"","label":"Resize fixed","localized":"","hint":"Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio"}, + {"id":"","label":"Crop and resize","localized":"","hint":"Resize the image so that entirety of target resolution is filled with the image. Crop parts that stick out"}, + {"id":"","label":"Resize and fill","localized":"","hint":"Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors"}, + {"id":"","label":"Resize using Latent upscale","localized":"","hint":""}, + {"id":"","label":"Mask blur","localized":"","hint":"How much to blur the mask before processing, in pixels"}, + {"id":"","label":"Mask transparency","localized":"","hint":""}, + {"id":"","label":"Inpaint masked","localized":"","hint":""}, + {"id":"","label":"Inpaint not masked","localized":"","hint":""}, + {"id":"","label":"fill","localized":"","hint":"fill it with colors of the image"}, + {"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"}, + {"id":"","label":"Whole picture","localized":"","hint":""}, + {"id":"","label":"Only masked","localized":"","hint":""}, + {"id":"","label":"Only masked padding, pixels","localized":"","hint":""}, + {"id":"","label":"Scale","localized":"","hint":""}, + {"id":"","label":"Unused","localized":"","hint":""}, + {"id":"","label":"Image CFG Scale","localized":"","hint":""} + ], + "train tabs": [ + {"id":"","label":"Merge models ","localized":"","hint":""}, + {"id":"","label":"Create embedding ","localized":"","hint":""}, + {"id":"","label":"Create hypernetwork ","localized":"","hint":""}, + {"id":"","label":"Preprocess images ","localized":"","hint":""}, + {"id":"","label":"Merge","localized":"","hint":""}, + {"id":"","label":"Calculate hash for all models (may take a long time)","localized":"","hint":""}, + {"id":"","label":"Create embedding","localized":"","hint":""}, + {"id":"","label":"Create hypernetwork","localized":"","hint":""}, + {"id":"","label":"Preprocess","localized":"","hint":""}, + {"id":"","label":"Train Embedding","localized":"","hint":""}, + {"id":"","label":"Train Hypernetwork","localized":"","hint":""} + ], + "train tab": [ + {"id":"","label":"Primary model","localized":"","hint":""}, + {"id":"","label":"Secondary model","localized":"","hint":""}, + {"id":"","label":"Tertiary model","localized":"","hint":""}, + {"id":"","label":"New model name","localized":"","hint":""}, + {"id":"","label":"No interpolation","localized":"","hint":"Result = A"}, + {"id":"","label":"Weighted sum","localized":"","hint":"Result = A * (1 - M) + B * M"}, + {"id":"","label":"Add difference","localized":"","hint":"Result = A + (B - C) * M"}, + {"id":"","label":"Interpolation ratio from Primary to Secondary","localized":"","hint":""}, + {"id":"","label":"ckpt","localized":"","hint":""}, + {"id":"","label":"safetensors","localized":"","hint":""}, + {"id":"","label":"Use FP16","localized":"","hint":""}, + {"id":"","label":"Save metadata","localized":"","hint":""}, + {"id":"","label":"Primary","localized":"","hint":""}, + {"id":"","label":"Secondary","localized":"","hint":""}, + {"id":"","label":"Tertiary","localized":"","hint":""}, + {"id":"","label":"Bake in VAE","localized":"","hint":""}, + {"id":"","label":"Discard weights with matching name","localized":"","hint":"Regular expression; if weights's name matches it, the weights is not written to the resulting checkpoint. Use ^model_ema to discard EMA weights"}, + {"id":"","label":"Name","localized":"","hint":""}, + {"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":"Number of vectors per token","localized":"","hint":""}, + {"id":"","label":"Overwrite Old Embedding","localized":"","hint":""}, + {"id":"","label":"Enter hypernetwork layer structure","localized":"","hint":""}, + {"id":"","label":"Select activation function of hypernetwork. Recommended : Swish / Linear(none)","localized":"","hint":""}, + {"id":"","label":"Select Layer weights initialization. Recommended: Kaiming for relu-like, Xavier for sigmoid-like, Normal otherwise","localized":"","hint":""}, + {"id":"","label":"Add layer normalization","localized":"","hint":""}, + {"id":"","label":"Use dropout","localized":"","hint":""}, + {"id":"","label":"Enter hypernetwork Dropout structure (or empty). Recommended : 0~0.35 incrementing sequence: 0, 0.05, 0.15","localized":"","hint":""}, + {"id":"","label":"Overwrite Old Hypernetwork","localized":"","hint":""}, + {"id":"","label":"Source directory","localized":"","hint":""}, + {"id":"","label":"Destination directory","localized":"","hint":""}, + {"id":"","label":"Existing Caption txt Action","localized":"","hint":""}, + {"id":"","label":"Keep original size","localized":"","hint":""}, + {"id":"","label":"Keep original image channels","localized":"","hint":""}, + {"id":"","label":"Create flipped copies","localized":"","hint":""}, + {"id":"","label":"Split oversized images","localized":"","hint":""}, + {"id":"","label":"Auto focal point crop","localized":"","hint":""}, + {"id":"","label":"Auto-sized crop","localized":"","hint":""}, + {"id":"","label":"Create captions only","localized":"","hint":""}, + {"id":"","label":"Create BLIP captions","localized":"","hint":""}, + {"id":"","label":"Create Deepbooru captions","localized":"","hint":""}, + {"id":"","label":"Split image threshold","localized":"","hint":""}, + {"id":"","label":"Split image overlap ratio","localized":"","hint":""}, + {"id":"","label":"Focal point face weight","localized":"","hint":""}, + {"id":"","label":"Focal point entropy weight","localized":"","hint":""}, + {"id":"","label":"Focal point edges weight","localized":"","hint":""}, + {"id":"","label":"Create debug image","localized":"","hint":""}, + {"id":"","label":"Dimension lower bound","localized":"","hint":""}, + {"id":"","label":"Dimension upper bound","localized":"","hint":""}, + {"id":"","label":"Area lower bound","localized":"","hint":""}, + {"id":"","label":"Area upper bound","localized":"","hint":""}, + {"id":"","label":"Maximize area","localized":"","hint":""}, + {"id":"","label":"Minimize error","localized":"","hint":""}, + {"id":"","label":"Error threshold","localized":"","hint":""}, + {"id":"","label":"Embedding","localized":"","hint":""}, + {"id":"","label":"Hypernetwork","localized":"","hint":""}, + {"id":"","label":"Embedding Learning rate","localized":"","hint":""}, + {"id":"","label":"Hypernetwork Learning rate","localized":"","hint":""}, + {"id":"","label":"Gradient Clipping","localized":"","hint":""}, + {"id":"","label":"Gradient accumulation steps","localized":"","hint":""}, + {"id":"","label":"Dataset directory","localized":"","hint":""}, + {"id":"","label":"Log directory","localized":"","hint":""}, + {"id":"","label":"Prompt template","localized":"","hint":""}, + {"id":"","label":"Do not resize images","localized":"","hint":""}, + {"id":"","label":"Max steps","localized":"","hint":""}, + {"id":"","label":"Save an image to log directory every N steps, 0 to disable","localized":"","hint":""}, + {"id":"","label":"Save a copy of embedding to log directory every N steps, 0 to disable","localized":"","hint":""}, + {"id":"","label":"Use PNG alpha channel as loss weight","localized":"","hint":""}, + {"id":"","label":"Save images with embedding in PNG chunks","localized":"","hint":""}, + {"id":"","label":"Read parameters (prompt, etc...) from txt2img tab when making previews","localized":"","hint":""}, + {"id":"","label":"Shuffle tags by ',' when creating prompts","localized":"","hint":""}, + {"id":"","label":"Drop out tags when creating prompts","localized":"","hint":""}, + {"id":"","label":"once","localized":"","hint":""}, + {"id":"","label":"deterministic","localized":"","hint":""}, + {"id":"","label":"random","localized":"","hint":""} + ], + "settings": [ + {"id":"","label":"Stable Diffusion checkpoint","localized":"","hint":"Select model checkpoint to use"}, + {"id":"","label":"Stable Diffusion checkpoint dict","localized":"","hint":"Select model from which to extract dictionary only"}, + {"id":"","label":"Number of cached model checkpoints","localized":"","hint":""}, + {"id":"","label":"Number of cached VAE checkpoints","localized":"","hint":""}, + {"id":"","label":"Select VAE","localized":"","hint":"Select variable auto-encoder to work with model when rendering images"}, + {"id":"","label":"Enable splitting of hires batch processing","localized":"","hint":""}, + {"id":"","label":"When loading models attempt stream loading optimized for slow or network storage","localized":"","hint":""}, + {"id":"","label":"When loading models attempt to reuse previous model dictionary","localized":"","hint":""}, + {"id":"","label":"Disable cross-attention layer optimization","localized":"","hint":""}, + {"id":"","label":"xFormers","localized":"","hint":""}, + {"id":"","label":"Scaled-Dot-Product","localized":"","hint":""}, + {"id":"","label":"Doggettx's","localized":"","hint":""}, + {"id":"","label":"InvokeAI's","localized":"","hint":""}, + {"id":"","label":"Sub-quadratic","localized":"","hint":""}, + {"id":"","label":"Split attention","localized":"","hint":""}, + {"id":"","label":"xFormers enable flash Attention","localized":"","hint":""}, + {"id":"","label":"SDP disable memory attention","localized":"","hint":""}, + {"id":"","label":"Sub-quadratic cross-attention query chunk size","localized":"","hint":""}, + {"id":"","label":"Sub-quadratic cross-attention kv chunk size","localized":"","hint":""}, + {"id":"","label":"Sub-quadratic cross-attention chunking threshold","localized":"","hint":""}, + {"id":"","label":"Full parser","localized":"","hint":""}, + {"id":"","label":"Compel parser","localized":"","hint":""}, + {"id":"","label":"A1111 parser","localized":"","hint":""}, + {"id":"","label":"Fixed attention","localized":"","hint":""}, + {"id":"","label":"Prompt attention mean normalization","localized":"","hint":""}, + {"id":"","label":"Disable conditional batching enabled on low memory systems","localized":"","hint":""}, + {"id":"","label":"Enable samplers quantization for sharper and cleaner results","localized":"","hint":""}, + {"id":"","label":"Increase coherency by padding from the last comma within n tokens when using more than 75 tokens","localized":"","hint":""}, + {"id":"","label":"Original","localized":"","hint":""}, + {"id":"","label":"Diffusers","localized":"","hint":""}, + {"id":"","label":"VRAM usage polls per second during generation","localized":"","hint":""}, + {"id":"","label":"Autocast","localized":"","hint":""}, + {"id":"","label":"Full","localized":"","hint":""}, + {"id":"","label":"FP32","localized":"","hint":""}, + {"id":"","label":"FP16","localized":"","hint":""}, + {"id":"","label":"BF16","localized":"","hint":""}, + {"id":"","label":"Use full precision for model (--no-half)","localized":"","hint":""}, + {"id":"","label":"Use full precision for VAE (--no-half-vae)","localized":"","hint":""}, + {"id":"","label":"Enable upcast sampling","localized":"","hint":""}, + {"id":"","label":"Enable upcast cross attention layer","localized":"","hint":""}, + {"id":"","label":"Disable NaN check in produced images/latent spaces","localized":"","hint":""}, + {"id":"","label":"Attempt to roll back VAE when produced NaN values, requires NaN check (experimental)","localized":"","hint":""}, + {"id":"","label":"Use channels last as torch memory format ","localized":"","hint":""}, + {"id":"","label":"Enable full-depth cuDNN benchmark feature","localized":"","hint":""}, + {"id":"","label":"Allow TF32 math ops","localized":"","hint":""}, + {"id":"","label":"Allow TF16 reduced precision math ops","localized":"","hint":""}, + {"id":"","label":"Enable model compile (experimental)","localized":"","hint":""}, + {"id":"","label":"inductor","localized":"","hint":""}, + {"id":"","label":"cudagraphs","localized":"","hint":""}, + {"id":"","label":"aot_ts_nvfuser","localized":"","hint":""}, + {"id":"","label":"hidet","localized":"","hint":""}, + {"id":"","label":"ipex","localized":"","hint":""}, + {"id":"","label":"Model compile verbose mode","localized":"","hint":""}, + {"id":"","label":"Model compile suppress errors","localized":"","hint":""}, + {"id":"","label":"Disable Torch memory garbage collection (experimental)","localized":"","hint":""}, + {"id":"","label":"Directory for temporary images; leave empty for default","localized":"","hint":""}, + {"id":"","label":"Cleanup non-default temporary directory when starting webui","localized":"","hint":""}, + {"id":"","label":"Path to directory with stable diffusion checkpoints","localized":"","hint":""}, + {"id":"","label":"Path to directory with stable diffusion diffusers","localized":"","hint":""}, + {"id":"","label":"Path to directory with VAE files","localized":"","hint":""}, + {"id":"","label":"Embeddings directory for textual inversion","localized":"","hint":""}, + {"id":"","label":"Hypernetwork directory","localized":"","hint":""}, + {"id":"","label":"Path to directory with codeformer model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with GFPGAN model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with ESRGAN model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with BSRGAN model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with RealESRGAN model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with ScuNET model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with SwinIR model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with LDSR model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with CLIP model file(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with Lora network(s)","localized":"","hint":""}, + {"id":"","label":"Path to directory with LyCORIS network(s)","localized":"","hint":""}, + {"id":"","label":"Path to user-defined styles file","localized":"","hint":""}, + {"id":"","label":"Always save all generated images","localized":"","hint":""}, + {"id":"","label":"File format for generated images","localized":"","hint":""}, + {"id":"","label":"Images filename pattern","localized":"","hint":"Use following tags to define how filenames for images 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