diff --git a/CHANGELOG.md b/CHANGELOG.md index f076ffac5..f69d8c7a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Mostly a service release - tons of fixes +- update ui hints - new option **inference mode** - default is standard `torch.no_grad` new option is `torch.inference_only` which is slightly faster and uses less vram, but only works on some gpus diff --git a/cli/validate-locale.py b/cli/validate-locale.py index 5eb574b84..b5dd48ba7 100755 --- a/cli/validate-locale.py +++ b/cli/validate-locale.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os import sys import json from rich import print # pylint: disable=redefined-builtin @@ -7,6 +8,9 @@ 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' + if not os.path.isfile(fn): + print(f'File not found: {fn}') + sys.exit(1) with open(fn, 'r', encoding="utf-8") as f: data = json.load(f) keys = [] diff --git a/html/locale_en.json b/html/locale_en.json index 07aa68b55..99fa6b8bc 100644 --- a/html/locale_en.json +++ b/html/locale_en.json @@ -9,7 +9,17 @@ {"id":"","label":"⏫","localized":"","hint":"Fill"}, {"id":"","label":"🎲️","localized":"","hint":"Use random seed"}, {"id":"","label":"♻️","localized":"","hint":"Reuse previous seed"}, - {"id":"","label":"β‡…","localized":"","hint":"Swap values"} + {"id":"","label":"β‡…","localized":"","hint":"Swap values"}, + {"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 current prompt as style template"}, + {"id":"","label":"⟲","localized":"","hint":"Refresh"}, + {"id":"","label":"πŸ—™","localized":"","hint":"Close"}, + {"id":"","label":"⊜","localized":"","hint":"Fill"}, + {"id":"","label":"πŸ“","localized":"","hint":"Measure"}, + {"id":"","label":"πŸ”","localized":"","hint":"Search"} ], "prompts": [ {"id":"","label":"Prompt","localized":"","hint":"Type what you want to see in the image"}, @@ -31,11 +41,13 @@ {"id":"","label":"Train","localized":"","hint":"Run training or model merging"}, {"id":"","label":"Models","localized":"","hint":"Convert or merge your models"}, {"id":"","label":"Interrogator","localized":"","hint":"Run interrogate to get description of your image"}, - {"id":"","label":"System Info","localized":"","hint":"System information and benchmarking"}, + {"id":"","label":"System Info","localized":"","hint":"System information"}, {"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":"Settings","localized":"","hint":"Application settings"}, - {"id":"","label":"Extensions","localized":"","hint":"Application extensions"} + {"id":"","label":"Extensions","localized":"","hint":"Application extensions"}, + {"id":"","label":"Script","localized":"","hint":"Addtional scripts to be used"} ], "action panel": [ {"id":"","label":"Generate","localized":"","hint":"Start processing"}, @@ -48,8 +60,10 @@ {"id":"","label":"Interrogate\nDeepBooru","localized":"","hint":"Run interrogate using DeepBooru model"} ], "extra networks": [ - {"id":"","label":"Extra networks tab order","localized":"","hint":"Comma-separated list of tab names; tabs listed here will appear in the extra networks UI first and in order listed"}, - {"id":"","label":"UI position","localized":"","hint":""}, + {"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 elelemtns (scrollable)"}, + {"id":"","label":"sidebar","localized":"","hint":"sidebar on the right side of the screen"}, {"id":"","label":"UI height (%)","localized":"","hint":""}, {"id":"","label":"UI sidebar width (%)","localized":"","hint":""}, {"id":"","label":"UI card preview lazy loading","localized":"","hint":""}, @@ -58,20 +72,19 @@ {"id":"","label":"UI image contain method","localized":"","hint":""}, {"id":"","label":"Do not automatically build extra network pages","localized":"","hint":""}, {"id":"","label":"Use LyCoris handler for all Lora types","localized":"","hint":""}, - {"id":"","label":"Disable built-in Lora handler","localized":"","hint":""}, - {"id":"","label":"Use Kohya method for handling multiple Loras","localized":"","hint":""}, + {"id":"","label":"Use Kohya method for handling multiple LoRA","localized":"","hint":""}, {"id":"","label":"Multiplier for extra networks","localized":"","hint":"When adding extra network such as Hypernetwork or Lora to prompt, use this multiplier for it"}, {"id":"","label":"Add hypernetwork to prompt","localized":"","hint":""}, {"id":"","label":"Add Lora to prompt","localized":"","hint":""}, {"id":"","label":"shuffle tags by ',' when creating prompts.","localized":"","hint":""}, - {"id":"","label":"extra text to add before <...> when adding extra network to prompt","localized":"","hint":""}, {"id":"","label":"When adding to prompt, refer to Lora by","localized":"","hint":""}, {"id":"","label":"add lora hashes to infotext","localized":"","hint":""}, - {"id":"","label":"Checkpoints","localized":"","hint":""}, - {"id":"","label":"Lora","localized":"","hint":""}, - {"id":"","label":"LyCORIS","localized":"","hint":""}, - {"id":"","label":"Textual Inversion","localized":"","hint":""}, - {"id":"","label":"Hypernetworks","localized":"","hint":""}, + {"id":"","label":"Checkpoints","localized":"","hint":"Trained model checkpoints"}, + {"id":"","label":"Styles","localized":"","hint":"Additional styles to be applied on selected generation paramters"}, + {"id":"","label":"Lora","localized":"","hint":"LoRA: Low-Rank Adaptation. Fine-tuned model that is applied on top of a loaded model"}, + {"id":"","label":"LyCORIS","localized":"","hint":"LyCORIS: Lora beYond Conventional methods. Fine-tuned model that is applied on top of a loaded model"}, + {"id":"","label":"Textual Inversion","localized":"","hint":"Textual inversion embedding is a trained embedded information about the subject"}, + {"id":"","label":"Hypernetworks","localized":"","hint":"Small trained neural network that modifies behavior of the loaded model"}, {"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"} @@ -102,17 +115,26 @@ {"id":"","label":"Apply changes & restart server","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 defaults","localized":"","hint":"Review and set current values as default values for the user interface"}, + {"id":"","label":"UI Config","localized":"","hint":"Review and set current values as default values for the user interface"}, {"id":"","label":"View changes","localized":"","hint":"Review changes between default user interface values and current values"}, {"id":"","label":"Set new 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 system defaults","localized":"","hint":"Restore default user interface values"} ], "txt2img tab": [ + {"id":"","label":"Batch","localized":"","hint":"Additional batching options"}, + {"id":"","label":"Seed details","localized":"","hint":"Additional options regarding initial seed used to produce images"}, + {"id":"","label":"Advanced","localized":"","hint":"Additional advanced options"}, {"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":"Use a pre-trained model to correct the generated faces. See GFPGAN or Codeformer."}, {"id":"","label":"Tiling","localized":"","hint":"Produce an image that can be tiled"}, - {"id":"","label":"Hires fix","localized":"","hint":"Use a similar process as image to image to upscale and add detail to the final image."}, + {"id":"","label":"full quality","localized":"","hint":"Use full quality VAE to decode latent samples"}, + {"id":"","label":"face restore","localized":"","hint":"Run processed image through additional face restoration model"}, + {"id":"","label":"denoise","localized":"","hint":"Denoising details for img2img"}, + {"id":"","label":"remove background","localized":"","hint":"Run processed image through additional background removal model"}, + {"id":"","label":"Second 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":"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"}, @@ -121,7 +143,8 @@ {"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":"Secondary sampler","localized":"","hint":"Use specific sampler as fallback sampler if primary is not supported for specific operation"}, - {"id":"","label":"Secondary steps","localized":"","hint":"Number of steps to use for second pass"}, + {"id":"","label":"Refiner start","localized":"","hint":"Refiner pass will start when base model is this much complete (set to 0 or 1 to run after full base model run)"}, + {"id":"","label":"Refiner steps","localized":"","hint":"Number of steps to use for refiner pass"}, {"id":"","label":"Secondary CFG Scale","localized":"","hint":"CFG scale used for refiner pass"}, {"id":"","label":"Guidance rescale","localized":"","hint":"Rescale CFG generated noise to avoid overexposed images"}, {"id":"","label":"Secondary Prompt","localized":"","hint":"Prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)"}, @@ -130,7 +153,7 @@ {"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":"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":"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":"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":"Show additional options"}, @@ -149,7 +172,7 @@ {"id":"","label":"Input directory","localized":"","hint":"Folder where the images are that you want to process"}, {"id":"","label":"Output directory","localized":"","hint":"Folder where the processed images should be saved to"}, {"id":"","label":"Show result images","localized":"","hint":"Enable to show the processed images in the image pane"}, - {"id":"","label":"Resize","localized":"","hint":"Factor for resizing 1x mean no upscale, 4x means 4 times upscale, high values might lead to memory issues on small graphics cards"}, + {"id":"","label":"Resize","localized":"","hint":"Resizing details. Higher resolutions require additional processing memory."}, {"id":"","label":"Crop to fit","localized":"","hint":"If the dimensions of your source image (e.g. 512x510) deviate from your target dimensions (e.g. 1024x768) this function will fit your upscaled image into your target size image. Excess will be cropped"}, {"id":"","label":"Secondary Upscaler","localized":"","hint":"Select secondary upscaler to run after initial upscaler"}, {"id":"","label":"Upscaler 2 visibility","localized":"","hint":"Strength of the secondary upscaler"}, @@ -167,24 +190,22 @@ {"id":"sett_reload_sd_model","label":"Reload checkpoint","localized":"","hint":"Reload currently selected model checkpoint"} ], "settings sections": [ - {"id":"","label":"Stable Diffusion","localized":"","hint":""}, + {"id":"","label":"execution & models","localized":"","hint":""}, {"id":"","label":"Optimizations","localized":"","hint":""}, {"id":"","label":"Compute Settings","localized":"","hint":""}, {"id":"","label":"Diffusers Settings","localized":"","hint":""}, {"id":"","label":"System Paths","localized":"","hint":""}, {"id":"","label":"Image Options","localized":"","hint":""}, - {"id":"","label":"Image Processing","localized":"","hint":""}, - {"id":"","label":"Image Paths","localized":"","hint":""}, + {"id":"","label":"image naming & 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":"Extra Networks","localized":"","hint":""}, - {"id":"","label":"Licenses","localized":"","hint":""}, - {"id":"","label":"Show all pages","localized":"","hint":""}, + {"id":"","label":"Licenses","localized":"","hint":"View licenses of all additional included libraries"}, + {"id":"","label":"Show all pages","localized":"","hint":"Show all settings pages"}, {"id":"","label":"Request browser notifications","localized":"","hint":""} ], "img2img tabs": [ @@ -192,8 +213,7 @@ {"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":""} + {"id":"","label":"Inpaint upload","localized":"","hint":""} ], "img2img tab": [ {"id":"","label":"Inpaint batch input directory","localized":"","hint":""}, @@ -207,7 +227,7 @@ {"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":"fill","localized":"","hint":"fill"}, {"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"}, @@ -318,20 +338,20 @@ {"id":"","label":"Original model","localized":"","hint":""} ], "settings": [ - {"id":"","label":"Stable Diffusion checkpoint","localized":"","hint":""}, - {"id":"","label":"Stable Diffusion refiner","localized":"","hint":""}, - {"id":"","label":"Stable Diffusion checkpoint autoload on server start","localized":"","hint":""}, - {"id":"","label":"stable diffusion checkpoint dict","localized":"","hint":""}, - {"id":"","label":"disallow usage of checkpoints in ckpt format","localized":"","hint":""}, + {"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":"model autoload on server start","localized":"","hint":""}, + {"id":"","label":"use baseline data from a different model","localized":"","hint":""}, + {"id":"","label":"Disallow usage of models in ckpt format","localized":"","hint":""}, {"id":"","label":"model compile fullgraph","localized":"","hint":""}, {"id":"","label":"create zip archive when downloading multiple images","localized":"","hint":""}, {"id":"","label":"samplers solver order where applicable","localized":"","hint":""}, - {"id":"","label":"samplers should use karras sigmas where applicable","localized":"","hint":""}, - {"id":"","label":"samplers should use use lower-order solvers in the final steps where applicable","localized":"","hint":""}, - {"id":"","label":"samplers should use dynamic thresholding where applicable","localized":"","hint":""}, - {"id":"","label":"Number of cached model checkpoints","localized":"","hint":"The amount of models to store in RAM for quick access"}, - {"id":"","label":"Number of cached VAE checkpoints","localized":"","hint":"The amount of VAE files to store in RAM for quick access"}, - {"id":"","label":"Select VAE","localized":"","hint":"VAE helps with fine details in the final image and may also alter colors"}, + {"id":"","label":"samplers use karras sigmas where applicable","localized":"","hint":""}, + {"id":"","label":"samplers use simplified solvers in final steps where applicable","localized":"","hint":""}, + {"id":"","label":"samplers use dynamic thresholding where applicable","localized":"","hint":""}, + {"id":"","label":"Number of cached models","localized":"","hint":"The amount of models to store in RAM for quick access"}, + {"id":"","label":"Number of cached VAEs","localized":"","hint":"The amount 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":"Enable splitting of hires batch processing","localized":"","hint":"Reduces VRAM usage when using hires fix on batches of images"}, {"id":"","label":"Load models using stream loading method","localized":"","hint":"When loading models attempt stream loading optimized for slow or network storage"}, {"id":"","label":"When loading models attempt to reuse previous model dictionary","localized":"","hint":""}, @@ -355,14 +375,13 @@ {"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":"Prompt padding for long prompts","localized":"","hint":"Increase coherency by padding from the last comma within n tokens when using more than 75 tokens"}, - {"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":"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":"Use 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":"Use 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":"Enable upcast sampling","localized":"","hint":"Usually produces similar results to --no-half with better performance while using less memory"}, @@ -371,9 +390,7 @@ {"id":"","label":"Attempt VAE roll back when produced NaN values (experimental)","localized":"","hint":"Requires Torch 2.1 and NaN check enabled"}, {"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":"Enable model compile","localized":"","hint":""}, {"id":"","label":"inductor","localized":"","hint":""}, {"id":"","label":"cudagraphs","localized":"","hint":""}, {"id":"","label":"aot_ts_nvfuser","localized":"","hint":""}, @@ -381,7 +398,6 @@ {"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","localized":"","hint":"Disable Torch memory garbage collection on each generation. CG will still run before & after model load as well when low GPU memory threshold is reached."}, {"id":"","label":"Directory for temporary images; leave empty for default","localized":"","hint":""}, {"id":"","label":"Enable IPEX Optimize for Intel GPUs","localized":"","hint":""}, {"id":"","label":"Cleanup non-default temporary directory when starting webui","localized":"","hint":""}, @@ -410,8 +426,6 @@ {"id":"","label":"Always save all generated image grids","localized":"","hint":""}, {"id":"","label":"File format for grids","localized":"","hint":""}, {"id":"","label":"Add extended info (seed, prompt) to filename when saving grid","localized":"","hint":""}, - {"id":"","label":"Do not save grids consisting of one picture","localized":"","hint":""}, - {"id":"","label":"Prevent empty spots in grid (when set to autodetect)","localized":"","hint":""}, {"id":"","label":"Grid row count","localized":"","hint":"Use -1 for autodetect and 0 for it to be same as batch size"}, {"id":"","label":"Create text file next to every image with generation parameters","localized":"","hint":""}, {"id":"","label":"Create JSON log file for each saved image","localized":"","hint":"Save image information to a JSON file"}, @@ -420,7 +434,7 @@ {"id":"","label":"Save copy of image before applying color correction","localized":"","hint":""}, {"id":"","label":"Save copy of the inpainting greyscale mask","localized":"","hint":""}, {"id":"","label":"Save copy of inpainting masked composite","localized":"","hint":""}, - {"id":"","label":"Save copy of processing init images","localized":"","hint":""}, + {"id":"","label":"Save copy of img2img init images","localized":"","hint":""}, {"id":"","label":"Quality for saved jpeg images","localized":"","hint":""}, {"id":"","label":"Use lossless compression for webp images","localized":"","hint":""}, {"id":"","label":"Maximum allowed image size in megapixels","localized":"","hint":""}, @@ -462,10 +476,7 @@ {"id":"","label":"Ctrl+up/down precision when editing ","localized":"","hint":""}, {"id":"","label":"Ctrl+up/down word delimiters","localized":"","hint":""}, {"id":"","label":"Quicksettings list","localized":"","hint":"List of setting names, separated by commas, for settings that should go to the quick access bar at the top instead the setting tab"}, - {"id":"","label":"Hidden UI tabs","localized":"","hint":""}, - {"id":"","label":"UI tabs order","localized":"","hint":""}, {"id":"","label":"UI scripts order","localized":"","hint":""}, - {"id":"","label":"txt2img/img2img UI item order","localized":"","hint":""}, {"id":"","label":"Show progressbar","localized":"","hint":""}, {"id":"","label":"Show live previews of the created image","localized":"","hint":""}, {"id":"","label":"Show previews of all images generated in a batch as a grid","localized":"","hint":""}, @@ -477,7 +488,7 @@ {"id":"","label":"Approximate simple","localized":"","hint":"Very cheap approximation. Very fast compared to VAE, but produces pictures with 8 times smaller horizontal/vertical resolution and extremely low quality"}, {"id":"","label":"TAESD","localized":"","hint":""}, {"id":"","label":"Combined","localized":"","hint":""}, - {"id":"","label":"Progressbar/preview update period, in milliseconds","localized":"","hint":""}, + {"id":"","label":"Progress update period","localized":"","hint":"Update period for UI progress bar and preview checks, in miliseconds"}, {"id":"","label":"Euler a","localized":"","hint":"Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps higher than 30-40 does not help"}, {"id":"","label":"Euler","localized":"","hint":""}, {"id":"","label":"LMS","localized":"","hint":""}, @@ -499,7 +510,6 @@ {"id":"","label":"DPM++ 2M SDE Karras","localized":"","hint":""}, {"id":"","label":"DDIM","localized":"","hint":"Denoising Diffusion Implicit Models - best at inpainting"}, {"id":"","label":"UniPC","localized":"","hint":"Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models"}, - {"id":"","label":"Force latent upscaler sampler","localized":"","hint":"Force specific sampler for second pass operations"}, {"id":"","label":"Noise multiplier for ancestral samplers (eta)","localized":"","hint":""}, {"id":"","label":"Noise multiplier for DDIM (eta)","localized":"","hint":""}, {"id":"","label":"uniform","localized":"","hint":""}, @@ -553,7 +563,6 @@ {"id":"","label":"Tile overlap in pixels for ESRGAN upscalers","localized":"","hint":"Low values = visible seam"}, {"id":"","label":"Tile size for SCUNET upscalers","localized":"","hint":"0 = no tiling"}, {"id":"","label":"Tile overlap for SCUNET upscalers","localized":"","hint":" Low values = visible seam"}, - {"id":"","label":"Hires fix uses width & height to set final resolution","localized":"","hint":"Hires fix uses width & height to set final resolution rather than first pass"}, {"id":"","label":"Do not fix prompt schedule for second order samplers","localized":"","hint":""}, {"id":"","label":"CodeFormer","localized":"","hint":""}, {"id":"","label":"GFPGAN","localized":"","hint":"Restore low quality faces using GFPGAN neural network"}, @@ -562,30 +571,45 @@ {"id":"","label":"Token merging ratio","localized":"","hint":"Enable redundant token merging via tomesd for speed and memory improvements, 0=disabled"}, {"id":"","label":"Token merging ratio for img2img","localized":"","hint":"Enable redundant token merging for img2img via tomesd for speed and memory improvements, 0=disabled"}, {"id":"","label":"Token merging ratio for hires pass","localized":"","hint":"Enable redundant token merging for hires pass via tomesd for speed and memory improvements, 0=disabled"}, - {"id":"","label":"Select diffuser pipeline when loading from safetensors","localized":"","hint":""}, + {"id":"","label":"Diffusers pipeline","localized":"","hint":"If autodetect does not detect model automatically, select model type before loading a model"}, {"id":"","label":"Move base model to CPU when using refiner","localized":"","hint":""}, + {"id":"","label":"Move base model to CPU when using VAE","localized":"","hint":""}, {"id":"","label":"Move refiner model to CPU when not in use","localized":"","hint":""}, - {"id":"","label":"Move UNet to CPU while VAE decoding","localized":"","hint":""}, {"id":"","label":"Use model EMA weights when possible","localized":"","hint":""}, {"id":"","label":"Generator device","localized":"","hint":""}, - {"id":"","label":"Enable sequential CPU offload","localized":"","hint":"Reduces GPU memory usage by transferring weights to the CPU. Increases inference time approximately 10%"}, - {"id":"","label":"Enable model CPU offload","localized":"","hint":"Transferring of entire models to the CPU, negligible impact on inference time while still providing some memory savings"}, + {"id":"","label":"Enable sequential CPU offload (--lowvram)","localized":"","hint":"Reduces GPU memory usage by transferring weights to the CPU. Increases inference time approximately 10%"}, + {"id":"","label":"Enable model CPU offload (--medvram)","localized":"","hint":"Transferring of entire models to the CPU, negligible impact on inference time while still providing some memory savings"}, {"id":"","label":"Enable VAE slicing","localized":"","hint":"Decodes batch latents one image at a time with limited VRAM. Small performance boost in VAE decode on multi-image batches"}, {"id":"","label":"Enable VAE tiling","localized":"","hint":"Divide large images into overlapping tiles with limited VRAM. Results in a minor increase in processing time"}, {"id":"","label":"Enable attention slicing","localized":"","hint":"Performs attention computation in steps instead of all at once. Slower inference times, but greatly reduced memory usage"}, {"id":"","label":"Diffusers model loading variant","localized":"","hint":""}, {"id":"","label":"Diffusers VAE loading variant","localized":"","hint":""}, - {"id":"","label":"Diffusers LoRA loading variant","localized":"","hint":"'sequential apply' loads and applies each LoRA in order of appearance, 'merge and apply' loads all LoRAs and merges them in-memory before applying to model, 'diffusers default' uses single LoRA loading method"} + {"id":"","label":"Diffusers LoRA loading variant","localized":"","hint":"'sequential apply' loads and applies each LoRA in order of appearance, 'merge and apply' loads all LoRAs and merges them in-memory before applying to model, 'diffusers default' uses single LoRA loading method"}, + {"id":"","label":"Torch inference mode","localized":"","hint":"Use torch inference mode"}, + {"id":"","label":"inference-mode","localized":"","hint":"Use torch.inference_mode"}, + {"id":"","label":"no-grad","localized":"","hint":"Use torch.no_grad"}, + {"id":"","label":"vae slicing (original)","localized":"","hint":"Run VAE on sliced samples to reduce memory requirements when processing high resolution images"}, + {"id":"","label":"use fixed unet precision","localized":"","hint":""}, + {"id":"","label":"enable model compile","localized":"","hint":"Enable usage of torch.compile"}, + {"id":"","label":"reduce-overhead","localized":"","hint":""}, + {"id":"","label":"max-autotune","localized":"","hint":""}, + {"id":"","label":"model compile precompile","localized":"","hint":"Run model compile immediately on model load instead of first use"}, + {"id":"","label":"sequential apply","localized":"","hint":"When loading multiple LoRAs, apply each in order of loading"}, + {"id":"","label":"merge and apply","localized":"","hint":"When loading multiple LoRAs, load all and merge them before applying to model"}, + {"id":"","label":"force zeros for prompts when empty","localized":"","hint":"Force full zero tensor when prompt is empty to remove any residual noise"}, + {"id":"","label":"require aesthetics score","localized":"","hint":"Automatically guide model towards higher-pleasing results, applicable only to refiner model"}, + {"id":"","label":"include watermark in saved images","localized":"","hint":"Add invisible watermark to image by altering some pixel values"}, + {"id":"","label":"image watermark string","localized":"","hint":"Watermark string to add to image. Keep very short to avoid image corruption."}, + {"id":"","label":"show log view","localized":"","hint":"Show log view at the bottom of the main window"}, + {"id":"","label":"Log view update period","localized":"","hint":"Log view update period, in miliseconds"} ], "scripts": [ - {"id":"","label":"Script","localized":"","hint":""}, {"id":"","label":"Swap X/Y","localized":"","hint":""}, {"id":"","label":"Swap Y/Z","localized":"","hint":""}, {"id":"","label":"Swap X/Z","localized":"","hint":""}, {"id":"","label":"Resize to","localized":"","hint":""}, {"id":"","label":"Resize by","localized":"","hint":""}, {"id":"","label":"Use via API","localized":"","hint":""}, - {"id":"","label":"Styles","localized":"","hint":""}, {"id":"","label":"Put variable parts at start of prompt","localized":"","hint":""}, {"id":"","label":"Use different seed for each picture","localized":"","hint":""}, {"id":"","label":"positive","localized":"","hint":""}, diff --git a/html/locale_ko.json b/html/locale_ko.json index ca3653222..c36545816 100644 --- a/html/locale_ko.json +++ b/html/locale_ko.json @@ -518,7 +518,7 @@ {"id":"","label":"logSNR","localized":"","hint":""}, {"id":"","label":"UniPC order (must be < sampling steps)","localized":"","hint":""}, {"id":"","label":"UniPC lower order final","localized":"","hint":""}, - {"id":"","label":"Enable addtional postprocessing operations","localized":"μΆ”κ°€ ν›„μ²˜λ¦¬ μž‘μ—…","hint":""}, + {"id":"","label":"Enable additional postprocessing operations","localized":"μΆ”κ°€ ν›„μ²˜λ¦¬ μž‘μ—…","hint":""}, {"id":"","label":"Postprocessing operation order","localized":"ν›„μ²˜λ¦¬ μž‘μ—… μˆœμ„œ","hint":""}, {"id":"","label":"Maximum number of images in upscaling cache","localized":"","hint":""}, {"id":"","label":"Move VAE and CLIP to RAM when training if possible","localized":"κ°€λŠ₯ν•˜λ‹€λ©΄ ν•™μŠ΅ μ‹œ VAE와 CLIP λͺ¨λΈμ„ 램으둜 이동","hint":""}, diff --git a/javascript/black-teal.css b/javascript/black-teal.css index c82ecd8cd..1f76b8476 100644 --- a/javascript/black-teal.css +++ b/javascript/black-teal.css @@ -93,6 +93,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } .extra-networks { border-left: 2px solid var(--highlight-color) !important; padding-left: 4px; } .image-buttons { gap: 10px !important; justify-content: center; } .image-buttons > button { max-width: 160px; } +.tooltip { background: var(--primary-300); color: black; border: none; border-radius: var(--radius-lg) } #system_row > button, #settings_row > button, #config_row > button { max-width: 190px; } /* gradio elements overrides */ diff --git a/javascript/setHints.js b/javascript/setHints.js index da98175ca..f755e6dee 100644 --- a/javascript/setHints.js +++ b/javascript/setHints.js @@ -87,7 +87,7 @@ async function setHints() { log('setHints', { type: localeData.type, elements: elements.length, localized, hints, data: localeData.data.length, time: t1 - t0 }); // sortUIElements(); removeSplash(); - // validateHints(elements, localeData.data) + // validateHints(elements, localeData.data); } onAfterUiUpdate(async () => { diff --git a/modules/devices.py b/modules/devices.py index cf58d5fe0..ed3951cf9 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -205,7 +205,12 @@ def set_cuda_params(): shared.log.info('Torch override VAE dtype: no-half set') dtype_vae = torch.float32 unet_needs_upcast = shared.opts.upcast_sampling - inference_context = torch.inference_mode if shared.opts.inference_mode == 'inference-mode' else torch.no_grad + if shared.opts.inference_mode == 'inference-mode': + inference_context = torch.inference_mode + elif shared.opts.inference_mode == 'no-grad': + inference_context = torch.no_grad + else: + inference_context = contextlib.nullcontext shared.log.debug(f'Desired Torch parameters: dtype={shared.opts.cuda_dtype} no-half={shared.opts.no_half} no-half-vae={shared.opts.no_half_vae} upscast={shared.opts.upcast_sampling}') shared.log.info(f'Setting Torch parameters: dtype={dtype} vae={dtype_vae} unet={dtype_unet} context={inference_context.__name__} fp16={fp16_ok} bf16={bf16_ok}') shared.log.debug(f'Torch default device: {torch.device(get_optimal_device_name())}') diff --git a/modules/modelloader.py b/modules/modelloader.py index afd2bcac3..27371dd6e 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -316,6 +316,19 @@ def extension_filter(ext_filter=None, ext_blacklist=None): return (not ext_filter or any(fp.upper().endswith(ew) for ew in ext_filter)) and (not ext_blacklist or not any(fp.upper().endswith(ew) for ew in ext_blacklist)) return filter +def load_file_from_url(url: str, *, model_dir: str, progress: bool = True, file_name: str | None = None) -> str: + """Download a file from url into model_dir, using the file present if possible. Returns the path to the downloaded file.""" + os.makedirs(model_dir, exist_ok=True) + if not file_name: + parts = urlparse(url) + file_name = os.path.basename(parts.path) + cached_file = os.path.abspath(os.path.join(model_dir, file_name)) + if not os.path.exists(cached_file): + shared.log.info(f'Downloading: url="{url}" file={cached_file}') + from torch.hub import download_url_to_file + download_url_to_file(url, cached_file, progress=progress) + return cached_file + def load_models(model_path: str, model_url: str = None, command_path: str = None, ext_filter=None, download_name=None, ext_blacklist=None) -> list: """ @@ -404,7 +417,6 @@ def move_files(src_path: str, dest_path: str, ext_filter: str = None): pass - def load_upscalers(): # We can only do this 'magic' method to dynamically load upscalers if they are referenced, so we'll try to import any _model.py files before looking in __subclasses__ modules_dir = os.path.join(shared.script_path, "modules") diff --git a/modules/sd_models.py b/modules/sd_models.py index d4db1da88..45bce3d0d 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -352,7 +352,7 @@ def read_metadata_from_safetensors(filename): v = 'data' if k == 'format' and v == 'pt': continue - large = True if len(v) > 4096 else False + large = True if len(v) > 2048 else False if large and k == 'ss_datasets': continue if large and k == 'workflow': diff --git a/modules/shared.py b/modules/shared.py index 6e42b3ff8..277ae33af 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -373,7 +373,7 @@ options_templates.update(options_section(('sd', "Execution & Models"), { "sd_checkpoint_cache": OptionInfo(0, "Number of cached models", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}), "sd_vae_checkpoint_cache": OptionInfo(0, "Number of cached VAEs", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}), "sd_vae": OptionInfo("Automatic", "VAE model", gr.Dropdown, lambda: {"choices": shared_items.sd_vae_items()}, refresh=shared_items.refresh_vae_list), - "sd_model_dict": OptionInfo('None', "Use dict from model", gr.Dropdown, lambda: {"choices": ['None'] + list_checkpoint_tiles()}, refresh=refresh_checkpoints), + "sd_model_dict": OptionInfo('None', "Use baseline data from a different model", gr.Dropdown, lambda: {"choices": ['None'] + list_checkpoint_tiles()}, refresh=refresh_checkpoints), "stream_load": OptionInfo(False, "Load models using stream loading method"), "model_reuse_dict": OptionInfo(False, "When loading models attempt to reuse previous model dictionary"), "prompt_attention": OptionInfo("Full parser", "Prompt attention parser", gr.Radio, lambda: {"choices": ["Full parser", "Compel parser", "A1111 parser", "Fixed attention"] }), @@ -391,7 +391,7 @@ options_templates.update(options_section(('optimizations', "Optimizations"), { "token_merging_ratio": OptionInfo(0.0, "Token merging ratio", gr.Slider, {"minimum": 0.0, "maximum": 0.9, "step": 0.1}), "token_merging_ratio_img2img": OptionInfo(0.0, "Token merging ratio for img2img", gr.Slider, {"minimum": 0.0, "maximum": 0.9, "step": 0.1}), "token_merging_ratio_hr": OptionInfo(0.0, "Token merging ratio for hires pass", gr.Slider, {"minimum": 0.0, "maximum": 0.9, "step": 0.1}), - "inference_mode": OptionInfo("no-grad", "Torch inference mode", gr.Radio, lambda: {"choices": ["no-grad", "inference-mode"]}), + "inference_mode": OptionInfo("no-grad", "Torch inference mode", gr.Radio, lambda: {"choices": ["no-grad", "inference-mode", "none"]}), "sd_vae_sliced_encode": OptionInfo(False, "VAE Slicing (original)"), })) @@ -482,11 +482,9 @@ options_templates.update(options_section(('saving-images', "Image Options"), { "grid_save": OptionInfo(True, "Always save all generated image grids"), "grid_format": OptionInfo('jpg', 'File format for grids', gr.Dropdown, lambda: {"choices": ["jpg", "png", "webp", "tiff", "jp2"]}), "n_rows": OptionInfo(-1, "Grid row count", gr.Slider, {"minimum": -1, "maximum": 16, "step": 1}), - # "grid_only_if_multiple": OptionInfo(True, "Do not save grids consisting of one picture"), - # "grid_prevent_empty_spots": OptionInfo(True, "Prevent empty spots in grid (when set to autodetect)"), "save_sep_options": OptionInfo("

Intermediate Image Saving

", "", gr.HTML), - "save_init_img": OptionInfo(True, "Save copy of img2img init images (helps track workflow)"), + "save_init_img": OptionInfo(True, "Save copy of img2img init images"), "save_images_before_highres_fix": OptionInfo(False, "Save copy of image before applying highres fix"), "save_images_before_refiner": OptionInfo(False, "Save copy of image before running refiner"), "save_images_before_face_restoration": OptionInfo(False, "Save copy of image before doing face restoration"), @@ -551,9 +549,9 @@ options_templates.update(options_section(('live-preview', "Live Previews"), { "show_progress_every_n_steps": OptionInfo(1, "Live preview display period", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}), "show_progress_type": OptionInfo("Approximate NN", "Live preview method", gr.Radio, {"choices": ["Full VAE", "Approximate NN", "Approximate simple", "TAESD"]}), "live_preview_content": OptionInfo("Combined", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}), - "live_preview_refresh_period": OptionInfo(500, "Progressbar/preview update period, in milliseconds", gr.Slider, {"minimum": 0, "maximum": 5000, "step": 25}), + "live_preview_refresh_period": OptionInfo(500, "Progress update period", gr.Slider, {"minimum": 0, "maximum": 5000, "step": 25}), "logmonitor_show": OptionInfo(True, "Show log view"), - "logmonitor_refresh_period": OptionInfo(5000, "Log view update period, in milliseconds", gr.Slider, {"minimum": 0, "maximum": 30000, "step": 25}), + "logmonitor_refresh_period": OptionInfo(5000, "Log view update period", gr.Slider, {"minimum": 0, "maximum": 30000, "step": 25}), })) options_templates.update(options_section(('sampler-params', "Sampler Settings"), { @@ -566,9 +564,9 @@ options_templates.update(options_section(('sampler-params', "Sampler Settings"), "schedulers_sep_diffusers": OptionInfo("

Diffusers specific config

", "", gr.HTML), "schedulers_prediction_type": OptionInfo("default", "Samplers override model prediction type", gr.Radio, lambda: {"choices": ['default', 'epsilon', 'sample', 'v-prediction']}), - "schedulers_use_karras": OptionInfo(True, "Samplers should use Karras sigmas where applicable"), - "schedulers_use_loworder": OptionInfo(True, "Samplers should use use lower-order solvers in the final steps where applicable"), - "schedulers_use_thresholding": OptionInfo(False, "Samplers should use dynamic thresholding where applicable"), + "schedulers_use_karras": OptionInfo(True, "Samplers use Karras sigmas where applicable"), + "schedulers_use_loworder": OptionInfo(True, "Samplers use simplified solvers in final steps where applicable"), + "schedulers_use_thresholding": OptionInfo(False, "Samplers use dynamic thresholding where applicable"), "schedulers_dpm_solver": OptionInfo("sde-dpmsolver++", "Samplers DPM solver algorithm", gr.Radio, lambda: {"choices": ['dpmsolver', 'dpmsolver++', 'sde-dpmsolver++']}), "schedulers_beta_schedule": OptionInfo("default", "Samplers override beta schedule", gr.Radio, lambda: {"choices": ['default', 'linear', 'scaled_linear', 'squaredcos_cap_v2']}), 'schedulers_beta_start': OptionInfo(0, "Samplers override beta start", gr.Number, {}), @@ -590,11 +588,8 @@ options_templates.update(options_section(('sampler-params', "Sampler Settings"), })) options_templates.update(options_section(('postprocessing', "Postprocessing"), { - 'postprocessing_enable_in_main_ui': OptionInfo([], "Enable addtional postprocessing operations", ui_components.DropdownMulti, lambda: {"choices": [x.name for x in shared_items.postprocessing_scripts()]}), + 'postprocessing_enable_in_main_ui': OptionInfo([], "Enable additional postprocessing operations", ui_components.DropdownMulti, lambda: {"choices": [x.name for x in shared_items.postprocessing_scripts()]}), 'postprocessing_operation_order': OptionInfo([], "Postprocessing operation order", ui_components.DropdownMulti, lambda: {"choices": [x.name for x in shared_items.postprocessing_scripts()]}), - # "use_old_hires_fix_width_height": OptionInfo(False, "Hires fix uses width & height to set final resolution"), - # "dont_fix_second_order_samplers_schedule": OptionInfo(False, "Do not fix prompt schedule for second order samplers"), - "postprocessing_sep_img2img": OptionInfo("

Img2Img & Inpainting

", "", gr.HTML), "img2img_color_correction": OptionInfo(False, "Apply color correction to match original colors"), "img2img_fix_steps": OptionInfo(False, "For image processing do exact number of steps as specified"), diff --git a/modules/ui.py b/modules/ui.py index ad3754416..d1b7a6b2a 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1153,7 +1153,7 @@ def create_ui(startup_timer = None): show_progress=info.refresh is not None, ) - button_set_checkpoint = gr.Button('Change checkpoint', elem_id='change_checkpoint', visible=False) + button_set_checkpoint = gr.Button('Change model', elem_id='change_checkpoint', visible=False) button_set_checkpoint.click( fn=lambda value, _: run_settings_single(value, key='sd_model_checkpoint'), _js="function(v){ var res = desiredCheckpointName; desiredCheckpointName = ''; return [res || v, null]; }", diff --git a/modules/ui_models.py b/modules/ui_models.py index 33cdf8b06..7998e13ac 100644 --- a/modules/ui_models.py +++ b/modules/ui_models.py @@ -213,7 +213,7 @@ def create_ui(): with gr.Column(scale=6): with gr.Row(): - hf_search_text = gr.Textbox('', label = 'Seach models', placeholder='search huggingface models') + hf_search_text = gr.Textbox('', label = 'Search models', placeholder='search huggingface models') hf_search_btn = ToolButton(value="πŸ”", label="Search") with gr.Row(): with gr.Column(scale=2): @@ -365,7 +365,7 @@ def create_ui(): civit_model_type = gr.Dropdown(label='Model type', choices=['SD 1.5', 'SD XL', 'LoRA', 'Other'], value='LoRA') with gr.Column(scale=15): with gr.Row(): - civit_search_text = gr.Textbox('', label = 'Seach models', placeholder='keyword') + civit_search_text = gr.Textbox('', label = 'Search models', placeholder='keyword') civit_search_tag = gr.Textbox('', label = '', placeholder='tags') civit_search_btn = ToolButton(value="πŸ”", label="Search", interactive=False) with gr.Row():