Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AUTOMATIC1111/stable-diffusion-webui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 550c2adebb02b9ad32c4d50b9020fda9ae83e3a5
Choose a base ref
..
head repository: AUTOMATIC1111/stable-diffusion-webui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 793a491923ba11adbe1024e0eb0402923165dafa
Choose a head ref
Showing with 2,337 additions and 1,850 deletions.
  1. +4 −0 .eslintignore
  2. +88 −0 .eslintrc.js
  3. +2 −0 .git-blame-ignore-revs
  4. +9 −0 .github/ISSUE_TEMPLATE/bug_report.yml
  5. +12 −24 .github/workflows/on_pull_request.yaml
  6. +2 −0 .gitignore
  7. +89 −39 CHANGELOG.md
  8. +6 −0 README.md
  9. +2 −2 extensions-builtin/LDSR/scripts/ldsr_model.py
  10. +7 −1 extensions-builtin/Lora/lora.py
  11. +4 −0 extensions-builtin/Lora/scripts/lora_script.py
  12. +1 −2 extensions-builtin/ScuNET/scripts/scunet_model.py
  13. +1 −1 extensions-builtin/SwinIR/scripts/swinir_model.py
  14. +26 −26 extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js
  15. +2 −3 html/extra-networks-card.html
  16. +113 −111 javascript/aspectRatioOverlay.js
  17. +172 −166 javascript/contextMenus.js
  18. +28 −24 javascript/dragdrop.js
  19. +120 −120 javascript/edit-attention.js
  20. +74 −71 javascript/extensions.js
  21. +215 −205 javascript/extraNetworks.js
  22. +25 −23 javascript/generationParams.js
  23. +47 −46 javascript/hints.js
  24. +18 −18 javascript/hires_fix.js
  25. +9 −10 javascript/imageMaskFix.js
  26. +2 −2 javascript/imageParams.js
  27. +111 −115 javascript/imageviewer.js
  28. +2 −2 javascript/imageviewerGamepad.js
  29. +176 −177 javascript/localization.js
  30. +6 −6 javascript/notification.js
  31. +92 −92 javascript/progressbar.js
  32. +17 −17 javascript/textualInversion.js
  33. +240 −225 javascript/ui.js
  34. +62 −62 javascript/ui_settings_hints.js
  35. +3 −3 launch.py
  36. +11 −2 modules/api/api.py
  37. +19 −2 modules/api/models.py
  38. +4 −1 modules/cmd_args.py
  39. +1 −1 modules/esrgan_model.py
  40. +25 −7 modules/generation_parameters_copypaste.py
  41. +41 −29 modules/images.py
  42. +5 −2 modules/modelloader.py
  43. +13 −21 modules/ngrok.py
  44. +178 −80 modules/processing.py
  45. +5 −1 modules/progress.py
  46. +1 −1 modules/realesrgan_model.py
  47. +28 −1 modules/scripts.py
  48. +26 −17 modules/sd_models.py
  49. +20 −6 modules/shared.py
  50. +1 −1 modules/styles.py
  51. +5 −1 modules/txt2img.py
  52. +50 −13 modules/ui.py
  53. +3 −1 modules/ui_extensions.py
  54. +21 −13 modules/ui_extra_networks.py
  55. +1 −0 modules/upscaler.py
  56. +11 −0 package.json
  57. +1 −1 requirements.txt
  58. +1 −1 requirements_versions.txt
  59. +51 −43 script.js
  60. +16 −8 style.css
  61. +2 −1 webui.py
  62. +10 −3 webui.sh
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extensions
extensions-disabled
repositories
venv
88 changes: 88 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/* global module */
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: "eslint:recommended",
parserOptions: {
ecmaVersion: "latest",
},
rules: {
"arrow-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"comma-dangle": ["error", "only-multiline"],
"comma-spacing": "error",
"comma-style": ["error", "last"],
"curly": ["error", "multi-line", "consistent"],
"eol-last": "error",
"func-call-spacing": "error",
"function-call-argument-newline": ["error", "consistent"],
"function-paren-newline": ["error", "consistent"],
"indent": ["error", 4],
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"no-extra-semi": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multi-spaces": "error",
"no-redeclare": ["error", {builtinGlobals: false}],
"no-trailing-spaces": "error",
"no-unused-vars": "off",
"no-whitespace-before-property": "error",
"object-curly-newline": ["error", {consistent: true, multiline: true}],
"object-curly-spacing": ["error", "never"],
"operator-linebreak": ["error", "after"],
"quote-props": ["error", "consistent-as-needed"],
"semi": ["error", "always"],
"semi-spacing": "error",
"semi-style": ["error", "last"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", "never"],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"switch-colon-spacing": "error",
"template-curly-spacing": ["error", "never"],
"unicode-bom": "error",
},
globals: {
//script.js
gradioApp: "readonly",
onUiLoaded: "readonly",
onUiUpdate: "readonly",
onOptionsChanged: "readonly",
uiCurrentTab: "writable",
uiElementIsVisible: "readonly",
uiElementInSight: "readonly",
executeCallbacks: "readonly",
//ui.js
opts: "writable",
all_gallery_buttons: "readonly",
selected_gallery_button: "readonly",
selected_gallery_index: "readonly",
switch_to_txt2img: "readonly",
switch_to_img2img_tab: "readonly",
switch_to_img2img: "readonly",
switch_to_sketch: "readonly",
switch_to_inpaint: "readonly",
switch_to_inpaint_sketch: "readonly",
switch_to_extras: "readonly",
get_tab_index: "readonly",
create_submit_args: "readonly",
restart_reload: "readonly",
updateInput: "readonly",
//extraNetworks.js
requestGet: "readonly",
popup: "readonly",
// from python
localization: "readonly",
// progrssbar.js
randomId: "readonly",
requestProgress: "readonly",
// imageviewer.js
modalPrevImage: "readonly",
modalNextImage: "readonly",
}
};
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Apply ESlint
9c54b78d9dde5601e916f308d9a9d6953ec39430
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -47,6 +47,15 @@ body:
description: Which commit are you running ? (Do not write *Latest version/repo/commit*, as this means nothing and will have changed by the time we read your issue. Rather, copy the **Commit** link at the bottom of the UI, or from the cmd/terminal if you can't launch it.)
validations:
required: true
- type: dropdown
id: py-version
attributes:
label: What Python version are you running on ?
multiple: false
options:
- Python 3.10.x
- Python 3.11.x (above, no supported yet)
- Python 3.9.x (below, no recommended)
- type: dropdown
id: platforms
attributes:
36 changes: 12 additions & 24 deletions .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# See https://github.com/actions/starter-workflows/blob/1067f16ad8a1eac328834e4b0ae24f7d206f810d/ci/pylint.yml for original reference file
name: Run Linting/Formatting on Pull Requests

on:
- push
- pull_request
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore for syntax docs
# if you want to filter out branches, delete the `- pull_request` and uncomment these lines :
# pull_request:
# branches:
# - master
# branches-ignore:
# - development

jobs:
lint:
lint-python:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
@@ -29,18 +21,14 @@ jobs:
run: pip install ruff==0.0.265
- name: Run Ruff
run: ruff .

# The rest are currently disabled pending fixing of e.g. installing the torch dependency.

# - name: Install PyLint
# run: |
# python -m pip install --upgrade pip
# pip install pylint
# # This lets PyLint check to see if it can resolve imports
# - name: Install dependencies
# run: |
# export COMMANDLINE_ARGS="--skip-torch-cuda-test --exit"
# python launch.py
# - name: Analysing the code with pylint
# run: |
# pylint $(git ls-files '*.py')
lint-js:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i --ci
- run: npm run lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -34,4 +34,6 @@ notification.mp3
/test/stderr.txt
/cache.json*
/config_states/
/node_modules
/package-lock.json
/.coverage*
128 changes: 89 additions & 39 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,127 @@
## Upcoming 1.3.0

### Features:
* add UI to edit defaults
* token merging (via dbolya/tomesd)
* settings tab rework: add a lot of additional explanations and links
* load extensions' Git metadata in parallel to loading the main program to save a ton of time during startup
* update extensions table: show branch, show date in separate column, and show version from tags if available
* TAESD - another option for cheap live previews
* allow choosing sampler and prompts for second pass of hires fix - hidden by default, enabled in settings

### Minor:
* bump Gradio to 3.31.0
* bump PyTorch to 2.0.1 for macOS and Linux AMD
* allow setting defaults for elements in extensions' tabs
* allow selecting file type for live previews
* show "Loading..." for extra networks when displaying for the first time
* suppress ENSD infotext for samplers that don't use it
* clientside optimizations
* add options to show/hide hidden files and dirs in extra networks, and to not list models/files in hidden directories
* allow whitespace in styles.csv
* add option to reorder tabs
* move some functionality (swap resolution and set seed to -1) to client
* option to specify editor height for img2img
* button to copy image resolution into img2img width/height sliders
* switch from pyngrok to ngrok-py
* lazy-load images in extra networks UI
* set "Navigate image viewer with gamepad" option to false by default, by request

### Extensions:
* add /sdapi/v1/script-info api
* use Ruff to lint Python code
* use ESlint to lint Javascript code
* add/modify CFG callbacks for Self-Attention Guidance extension
* add command and endpoint for graceful server stopping
* add some locals (prompts/seeds/etc) from processing function into the Processing class as fields
* rework quoting for infotext items that have commas in them to use JSON (should be backwards compatible except for cases where it didn't work previously)

### Bug Fixes:
* fix an issue preventing the program from starting if the user specifies a bad Gradio theme
* fix broken prompts from file script
* fix symlink scanning for extra networks
* fix --data-dir ignored when launching via webui-user.bat COMMANDLINE_ARGS
* allow web UI to be ran fully offline
* fix inability to run with --freeze-settings
* fix inability to merge checkpoint without adding metadata
* fix extra networks' save preview image not adding infotext for jpeg/webm
* remove blinking effect from text in hires fix and scale resolution preview


## 1.2.1

### Features:
* add an option to always refer to lora by filenames
* add an option to always refer to LoRA by filenames

### Bug Fixes:
* never refer to lora by an alias if multiple loras have same alias or the alias is called none
* never refer to LoRA by an alias if multiple LoRAs have same alias or the alias is called none
* fix upscalers disappearing after the user reloads UI
* allow bf16 in safe unpickler (resolves problems with loading some loras)
* allow bf16 in safe unpickler (resolves problems with loading some LoRAs)
* allow web UI to be ran fully offline
* fix localizations not working
* fix error for loras: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
* fix error for LoRAs: `'LatentDiffusion' object has no attribute 'lora_layer_mapping'`

## 1.2.0

### Features:
* do not wait for stable diffusion model to load at startup
* add filename patterns: [denoising]
* directory hiding for extra networks: dirs starting with . will hide their cards on extra network tabs unless specifically searched for
* Lora: for the `<...>` text in prompt, use name of Lora that is in the metdata of the file, if present, instead of filename (both can be used to activate lora)
* Lora: read infotext params from kohya-ss's extension parameters if they are present and if his extension is not active
* Lora: Fix some Loras not working (ones that have 3x3 convolution layer)
* Lora: add an option to use old method of applying loras (producing same results as with kohya-ss)
* do not wait for Stable Diffusion model to load at startup
* add filename patterns: `[denoising]`
* directory hiding for extra networks: dirs starting with `.` will hide their cards on extra network tabs unless specifically searched for
* LoRA: for the `<...>` text in prompt, use name of LoRA that is in the metdata of the file, if present, instead of filename (both can be used to activate LoRA)
* LoRA: read infotext params from kohya-ss's extension parameters if they are present and if his extension is not active
* LoRA: fix some LoRAs not working (ones that have 3x3 convolution layer)
* LoRA: add an option to use old method of applying LoRAs (producing same results as with kohya-ss)
* add version to infotext, footer and console output when starting
* add links to wiki for filename pattern settings
* add extended info for quicksettings setting and use multiselect input instead of a text field

### Minor:
* gradio bumped to 3.29.0
* torch bumped to 2.0.1
* --subpath option for gradio for use with reverse proxy
* linux/OSX: use existing virtualenv if already active (the VIRTUAL_ENV environment variable)
* possible frontend optimization: do not apply localizations if there are none
* Add extra `None` option for VAE in XYZ plot
* bump Gradio to 3.29.0
* bump PyTorch to 2.0.1
* `--subpath` option for gradio for use with reverse proxy
* Linux/macOS: use existing virtualenv if already active (the VIRTUAL_ENV environment variable)
* do not apply localizations if there are none (possible frontend optimization)
* add extra `None` option for VAE in XYZ plot
* print error to console when batch processing in img2img fails
* create HTML for extra network pages only on demand
* allow directories starting with . to still list their models for lora, checkpoints, etc
* allow directories starting with `.` to still list their models for LoRA, checkpoints, etc
* put infotext options into their own category in settings tab
* do not show licenses page when user selects Show all pages in settings

### Extensions:
* Tooltip localization support
* Add api method to get LoRA models with prompt
* tooltip localization support
* add API method to get LoRA models with prompt

### Bug Fixes:
* re-add /docs endpoint
* re-add `/docs` endpoint
* fix gamepad navigation
* make the lightbox fullscreen image function properly
* fix squished thumbnails in extras tab
* keep "search" filter for extra networks when user refreshes the tab (previously it showed everthing after you refreshed)
* fix webui showing the same image if you configure the generation to always save results into same file
* fix bug with upscalers not working properly
* Fix MPS on PyTorch 2.0.1, Intel Macs
* fix MPS on PyTorch 2.0.1, Intel Macs
* make it so that custom context menu from contextMenu.js only disappears after user's click, ignoring non-user click events
* prevent Reload UI button/link from reloading the page when it's not yet ready
* fix prompts from file script failing to read contents from a drag/drop file


## 1.1.1
### Bug Fixes:
* fix an error that prevents running webui on torch<2.0 without --disable-safe-unpickle
* fix an error that prevents running webui on PyTorch<2.0 without --disable-safe-unpickle

## 1.1.0
### Features:
* switch to torch 2.0.0 (except for AMD GPUs)
* switch to PyTorch 2.0.0 (except for AMD GPUs)
* visual improvements to custom code scripts
* add filename patterns: [clip_skip], [hasprompt<>], [batch_number], [generation_number]
* add filename patterns: `[clip_skip]`, `[hasprompt<>]`, `[batch_number]`, `[generation_number]`
* add support for saving init images in img2img, and record their hashes in infotext for reproducability
* automatically select current word when adjusting weight with ctrl+up/down
* add dropdowns for X/Y/Z plot
* setting: Stable Diffusion/Random number generator source: makes it possible to make images generated from a given manual seed consistent across different GPUs
* add setting: Stable Diffusion/Random number generator source: makes it possible to make images generated from a given manual seed consistent across different GPUs
* support Gradio's theme API
* use TCMalloc on Linux by default; possible fix for memory leaks
* (optimization) option to remove negative conditioning at low sigma values #9177
* add optimization option to remove negative conditioning at low sigma values #9177
* embed model merge metadata in .safetensors file
* extension settings backup/restore feature #9169
* add "resize by" and "resize to" tabs to img2img
@@ -80,22 +130,22 @@
* button to restore the progress from session lost / tab reload

### Minor:
* gradio bumped to 3.28.1
* in extra tab, change extras "scale to" to sliders
* bump Gradio to 3.28.1
* change "scale to" to sliders in Extras tab
* add labels to tool buttons to make it possible to hide them
* add tiled inference support for ScuNET
* add branch support for extension installation
* change linux installation script to insall into current directory rather than /home/username
* sort textual inversion embeddings by name (case insensitive)
* change Linux installation script to install into current directory rather than `/home/username`
* sort textual inversion embeddings by name (case-insensitive)
* allow styles.csv to be symlinked or mounted in docker
* remove the "do not add watermark to images" option
* make selected tab configurable with UI config
* extra networks UI in now fixed height and scrollable
* add disable_tls_verify arg for use with self-signed certs
* make the extra networks UI fixed height and scrollable
* add `disable_tls_verify` arg for use with self-signed certs

### Extensions:
* Add reload callback
* add is_hr_pass field for processing
* add reload callback
* add `is_hr_pass` field for processing

### Bug Fixes:
* fix broken batch image processing on 'Extras/Batch Process' tab
@@ -111,10 +161,10 @@
* one broken image in img2img batch won't stop all processing
* fix image orientation bug in train/preprocess
* fix Ngrok recreating tunnels every reload
* fix --realesrgan-models-path and --ldsr-models-path not working
* fix --skip-install not working
* outpainting Mk2 & Poorman should use the SAMPLE file format to save images, not GRID file format
* do not fail all Loras if some have failed to load when making a picture
* fix `--realesrgan-models-path` and `--ldsr-models-path` not working
* fix `--skip-install` not working
* use SAMPLE file format in Outpainting Mk2 & Poorman
* do not fail all LoRAs if some have failed to load when making a picture

## 1.0.0
* everything
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -99,6 +99,12 @@ Alternatively, use online services (like Google Colab):

- [List of Online Services](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Online-Services)

### Installation on Windows 10/11 with NVidia-GPUs using release package
1. Download `sd.webui.zip` from [v1.0.0-pre](https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.0.0-pre) and extract it's contents.
2. Run `update.bat`.
3. Run `run.bat`.
> For more details see [Install-and-Run-on-NVidia-GPUs](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs)
### Automatic Installation on Windows
1. Install [Python 3.10.6](https://www.python.org/downloads/release/python-3106/) (Newer version of Python does not support torch), checking "Add Python to PATH".
2. Install [git](https://git-scm.com/download/win).
4 changes: 2 additions & 2 deletions extensions-builtin/LDSR/scripts/ldsr_model.py
Original file line number Diff line number Diff line change
@@ -45,9 +45,9 @@ def load_model(self, path: str):
if local_safetensors_path is not None and os.path.exists(local_safetensors_path):
model = local_safetensors_path
else:
model = local_ckpt_path if local_ckpt_path is not None else load_file_from_url(url=self.model_url, model_dir=self.model_path, file_name="model.ckpt", progress=True)
model = local_ckpt_path if local_ckpt_path is not None else load_file_from_url(url=self.model_url, model_dir=self.model_download_path, file_name="model.ckpt", progress=True)

yaml = local_yaml_path if local_yaml_path is not None else load_file_from_url(url=self.yaml_url, model_dir=self.model_path, file_name="project.yaml", progress=True)
yaml = local_yaml_path if local_yaml_path is not None else load_file_from_url(url=self.yaml_url, model_dir=self.model_download_path, file_name="project.yaml", progress=True)

try:
return LDSR(model, yaml)
Loading