Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4afaaf8a02 | |||
| bda2ecdbf5 | |||
| 5ef669de08 | |||
| e7965a5eb8 | |||
| ae7291fb49 | |||
| d43333ff71 | |||
| 0cdbd90d6b | |||
| d0026da483 | |||
| 8d54739de5 | |||
| 135b61bc0b | |||
| 87cca029d7 | |||
| 1ac11b3dae | |||
| 87a083d1b2 | |||
| 503bd3fc0f | |||
| 9e7de49fc5 | |||
| 06bc1f4f67 | |||
| 338d0b6103 | |||
| 3989d7e88b | |||
| afea99a72b | |||
| 965c728914 | |||
| 46f3ee9594 | |||
| 323dcadea2 | |||
| 642faa1f65 | |||
| a0af2852b6 | |||
| 00e393ce10 | |||
| 0c9282b84d | |||
| 444f102964 | |||
| 738e133b24 | |||
| 6558716018 | |||
| 8a7a4275a8 | |||
| c0f9821c35 | |||
| 86708463f1 | |||
| bfc5c08109 | |||
| d0d5075914 | |||
| d63117ace5 | |||
| 66d7630705 | |||
| cb81087b59 | |||
| 6139b145f0 | |||
| f331821b27 | |||
| 5359dc0a10 | |||
| 7989765faa | |||
| 783a5754d5 | |||
| 5e30f737b0 | |||
| 9dd0c4add5 | |||
| 1b46863f24 | |||
| 3d83683a28 | |||
| ac1abf3de6 | |||
| e004384e46 | |||
| e835e61f3a | |||
| c8c73eae59 | |||
| c39efa6ba6 | |||
| c9c8485bc1 |
@@ -26,7 +26,7 @@ body:
|
|||||||
id: steps
|
id: steps
|
||||||
attributes:
|
attributes:
|
||||||
label: Steps to reproduce the problem
|
label: Steps to reproduce the problem
|
||||||
description: Please provide us with precise step by step information on how to reproduce the bug
|
description: Please provide us with precise step by step instructions on how to reproduce the bug
|
||||||
value: |
|
value: |
|
||||||
1. Go to ....
|
1. Go to ....
|
||||||
2. Press ....
|
2. Press ....
|
||||||
@@ -37,64 +37,14 @@ body:
|
|||||||
id: what-should
|
id: what-should
|
||||||
attributes:
|
attributes:
|
||||||
label: What should have happened?
|
label: What should have happened?
|
||||||
description: Tell what you think the normal behavior should be
|
description: Tell us what you think the normal behavior should be
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: textarea
|
||||||
id: commit
|
id: sysinfo
|
||||||
attributes:
|
attributes:
|
||||||
label: Version or Commit where the problem happens
|
label: Sysinfo
|
||||||
description: "Which webui version or 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 **Version: v1.2.3** link at the bottom of the UI, or from the cmd/terminal if you can't launch it.)"
|
description: System info file, generated by WebUI. You can generate it in settings, on the Sysinfo page. Drag the file into the field to upload it. If you submit your report without including the sysinfo file, the report will be closed. If needed, review the report to make sure it includes no personal information you don't want to share. If you can't start WebUI, you can use --dump-sysinfo commandline argument to generate the file.
|
||||||
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:
|
|
||||||
label: What platforms do you use to access the UI ?
|
|
||||||
multiple: true
|
|
||||||
options:
|
|
||||||
- Windows
|
|
||||||
- Linux
|
|
||||||
- MacOS
|
|
||||||
- iOS
|
|
||||||
- Android
|
|
||||||
- Other/Cloud
|
|
||||||
- type: dropdown
|
|
||||||
id: device
|
|
||||||
attributes:
|
|
||||||
label: What device are you running WebUI on?
|
|
||||||
multiple: true
|
|
||||||
options:
|
|
||||||
- Nvidia GPUs (RTX 20 above)
|
|
||||||
- Nvidia GPUs (GTX 16 below)
|
|
||||||
- AMD GPUs (RX 6000 above)
|
|
||||||
- AMD GPUs (RX 5000 below)
|
|
||||||
- CPU
|
|
||||||
- Other GPUs
|
|
||||||
- type: dropdown
|
|
||||||
id: cross_attention_opt
|
|
||||||
attributes:
|
|
||||||
label: Cross attention optimization
|
|
||||||
description: What cross attention optimization are you using, Settings -> Optimizations -> Cross attention optimization
|
|
||||||
multiple: false
|
|
||||||
options:
|
|
||||||
- Automatic
|
|
||||||
- xformers
|
|
||||||
- sdp-no-mem
|
|
||||||
- sdp
|
|
||||||
- Doggettx
|
|
||||||
- V1
|
|
||||||
- InvokeAI
|
|
||||||
- "None "
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
@@ -108,21 +58,7 @@ body:
|
|||||||
- Brave
|
- Brave
|
||||||
- Apple Safari
|
- Apple Safari
|
||||||
- Microsoft Edge
|
- Microsoft Edge
|
||||||
- type: textarea
|
- Other
|
||||||
id: cmdargs
|
|
||||||
attributes:
|
|
||||||
label: Command Line Arguments
|
|
||||||
description: Are you using any launching parameters/command line arguments (modified webui-user .bat/.sh) ? If yes, please write them below. Write "No" otherwise.
|
|
||||||
render: Shell
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: extensions
|
|
||||||
attributes:
|
|
||||||
label: List of extensions
|
|
||||||
description: Are you using any extensions other than built-ins? If yes, provide a list, you can copy it at "Extensions" tab. Write "No" otherwise.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
+23
-1
@@ -1,3 +1,8 @@
|
|||||||
|
## 1.6.1
|
||||||
|
|
||||||
|
### Bug Fixes:
|
||||||
|
* fix an error causing the webui to fail to start ([#13839](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/13839))
|
||||||
|
|
||||||
## 1.6.0
|
## 1.6.0
|
||||||
|
|
||||||
### Features:
|
### Features:
|
||||||
@@ -65,9 +70,12 @@
|
|||||||
* make progress bar work independently from live preview display which results in it being updated a lot more often
|
* make progress bar work independently from live preview display which results in it being updated a lot more often
|
||||||
* forbid Full live preview method for medvram and add a setting to undo the forbidding
|
* forbid Full live preview method for medvram and add a setting to undo the forbidding
|
||||||
* make it possible to localize tooltips and placeholders
|
* make it possible to localize tooltips and placeholders
|
||||||
|
* add option to align with sgm repo's sampling implementation ([#12818](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12818))
|
||||||
|
* Restore faces and Tiling generation parameters have been moved to settings out of main UI
|
||||||
|
* if you want to put them back into main UI, use `Options in main UI` setting on the UI page.
|
||||||
|
|
||||||
### Extensions and API:
|
### Extensions and API:
|
||||||
* gradio 3.41.0
|
* gradio 3.41.2
|
||||||
* also bump versions for packages: transformers, GitPython, accelerate, scikit-image, timm, tomesd
|
* also bump versions for packages: transformers, GitPython, accelerate, scikit-image, timm, tomesd
|
||||||
* support tooltip kwarg for gradio elements: gr.Textbox(label='hello', tooltip='world')
|
* support tooltip kwarg for gradio elements: gr.Textbox(label='hello', tooltip='world')
|
||||||
* properly clear the total console progressbar when using txt2img and img2img from API
|
* properly clear the total console progressbar when using txt2img and img2img from API
|
||||||
@@ -127,6 +135,20 @@
|
|||||||
* set devices.dtype_unet correctly
|
* set devices.dtype_unet correctly
|
||||||
* run RealESRGAN on GPU for non-CUDA devices ([#12737](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12737))
|
* run RealESRGAN on GPU for non-CUDA devices ([#12737](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12737))
|
||||||
* prevent extra network buttons being obscured by description for very small card sizes ([#12745](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12745))
|
* prevent extra network buttons being obscured by description for very small card sizes ([#12745](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12745))
|
||||||
|
* fix error that causes some extra networks to be disabled if both <lora:> and <lyco:> are present in the prompt
|
||||||
|
* fix defaults settings page breaking when any of main UI tabs are hidden
|
||||||
|
* fix incorrect save/display of new values in Defaults page in settings
|
||||||
|
* fix for Reload UI function: if you reload UI on one tab, other opened tabs will no longer stop working
|
||||||
|
* fix an error that prevents VAE being reloaded after an option change if a VAE near the checkpoint exists ([#12797](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12737))
|
||||||
|
* hide broken image crop tool ([#12792](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12737))
|
||||||
|
* don't show hidden samplers in dropdown for XYZ script ([#12780](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12737))
|
||||||
|
* fix style editing dialog breaking if it's opened in both img2img and txt2img tabs
|
||||||
|
* fix a bug allowing users to bypass gradio and API authentication (reported by vysecurity)
|
||||||
|
* fix notification not playing when built-in webui tab is inactive ([#12834](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12834))
|
||||||
|
* honor `--skip-install` for extension installers ([#12832](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12832))
|
||||||
|
* don't print blank stdout in extension installers ([#12833](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12832), [#12855](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12855))
|
||||||
|
* do not change quicksettings dropdown option when value returned is `None` ([#12854](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12854))
|
||||||
|
* get progressbar to display correctly in extensions tab
|
||||||
|
|
||||||
|
|
||||||
## 1.5.2
|
## 1.5.2
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ class LoraUserMetadataEditor(ui_extra_networks_user_metadata.UserMetadataEditor)
|
|||||||
metadata = item.get("metadata") or {}
|
metadata = item.get("metadata") or {}
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
|
'ss_output_name': "Output name:",
|
||||||
'ss_sd_model_name': "Model:",
|
'ss_sd_model_name': "Model:",
|
||||||
'ss_clip_skip': "Clip skip:",
|
'ss_clip_skip': "Clip skip:",
|
||||||
'ss_network_module': "Kohya module:",
|
'ss_network_module': "Kohya module:",
|
||||||
|
|||||||
@@ -385,6 +385,8 @@ onUiLoaded(async() => {
|
|||||||
targetElement.style.overflow = "hidden";
|
targetElement.style.overflow = "hidden";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
targetElement.isZoomed = false;
|
||||||
|
|
||||||
fixCanvas();
|
fixCanvas();
|
||||||
targetElement.style.transform = `scale(${elemData[elemId].zoomLevel}) translate(${elemData[elemId].panX}px, ${elemData[elemId].panY}px)`;
|
targetElement.style.transform = `scale(${elemData[elemId].zoomLevel}) translate(${elemData[elemId].panX}px, ${elemData[elemId].panY}px)`;
|
||||||
|
|
||||||
@@ -479,7 +481,7 @@ onUiLoaded(async() => {
|
|||||||
|
|
||||||
// Update the zoom level and pan position of the target element based on the values of the zoomLevel, panX and panY variables
|
// Update the zoom level and pan position of the target element based on the values of the zoomLevel, panX and panY variables
|
||||||
function updateZoom(newZoomLevel, mouseX, mouseY) {
|
function updateZoom(newZoomLevel, mouseX, mouseY) {
|
||||||
newZoomLevel = Math.max(0.5, Math.min(newZoomLevel, 15));
|
newZoomLevel = Math.max(0.1, Math.min(newZoomLevel, 15));
|
||||||
|
|
||||||
elemData[elemId].panX +=
|
elemData[elemId].panX +=
|
||||||
mouseX - (mouseX * newZoomLevel) / elemData[elemId].zoomLevel;
|
mouseX - (mouseX * newZoomLevel) / elemData[elemId].zoomLevel;
|
||||||
@@ -520,6 +522,8 @@ onUiLoaded(async() => {
|
|||||||
zoomPosX - targetElement.getBoundingClientRect().left,
|
zoomPosX - targetElement.getBoundingClientRect().left,
|
||||||
zoomPosY - targetElement.getBoundingClientRect().top
|
zoomPosY - targetElement.getBoundingClientRect().top
|
||||||
);
|
);
|
||||||
|
|
||||||
|
targetElement.isZoomed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -596,17 +600,16 @@ onUiLoaded(async() => {
|
|||||||
`${elemId} canvas[key="interface"]`
|
`${elemId} canvas[key="interface"]`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isExtension) {
|
|
||||||
targetElement.style.overflow = "visible";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!canvas) return;
|
if (!canvas) return;
|
||||||
|
|
||||||
if (canvas.offsetWidth > 862 || isExtension) {
|
if (canvas.offsetWidth > 862 || isExtension) {
|
||||||
targetElement.style.width = (canvas.offsetWidth + 2) + "px";
|
targetElement.style.width = (canvas.offsetWidth + 2) + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isExtension) {
|
||||||
|
targetElement.style.overflow = "visible";
|
||||||
|
}
|
||||||
|
|
||||||
if (fullScreenMode) {
|
if (fullScreenMode) {
|
||||||
resetZoom();
|
resetZoom();
|
||||||
fullScreenMode = false;
|
fullScreenMode = false;
|
||||||
@@ -867,7 +870,40 @@ onUiLoaded(async() => {
|
|||||||
isMoving = false;
|
isMoving = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Checks for extension
|
||||||
|
function checkForOutBox() {
|
||||||
|
const parentElement = targetElement.closest('[id^="component-"]');
|
||||||
|
if (parentElement.offsetWidth < targetElement.offsetWidth && !targetElement.isExpanded) {
|
||||||
|
resetZoom();
|
||||||
|
targetElement.isExpanded = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parentElement.offsetWidth < targetElement.offsetWidth && elemData[elemId].zoomLevel == 1) {
|
||||||
|
resetZoom();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parentElement.offsetWidth < targetElement.offsetWidth && targetElement.offsetWidth * elemData[elemId].zoomLevel > parentElement.offsetWidth && elemData[elemId].zoomLevel < 1 && !targetElement.isZoomed) {
|
||||||
|
resetZoom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isExtension) {
|
||||||
|
targetElement.addEventListener("mousemove", checkForOutBox);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
window.addEventListener('resize', (e) => {
|
||||||
|
resetZoom();
|
||||||
|
|
||||||
|
if (isExtension) {
|
||||||
|
targetElement.isExpanded = false;
|
||||||
|
targetElement.isZoomed = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
gradioApp().addEventListener("mousemove", handleMoveByKey);
|
gradioApp().addEventListener("mousemove", handleMoveByKey);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
applyZoomAndPan(elementIDs.sketch, false);
|
applyZoomAndPan(elementIDs.sketch, false);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ function extensions_check() {
|
|||||||
|
|
||||||
|
|
||||||
var id = randomId();
|
var id = randomId();
|
||||||
requestProgress(id, gradioApp().getElementById('extensions_installed_top'), null, function() {
|
requestProgress(id, gradioApp().getElementById('extensions_installed_html'), null, function() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -249,6 +249,15 @@ function popup(contents) {
|
|||||||
globalPopup.style.display = "flex";
|
globalPopup.style.display = "flex";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var storedPopupIds = {};
|
||||||
|
function popupId(id) {
|
||||||
|
if (!storedPopupIds[id]) {
|
||||||
|
storedPopupIds[id] = gradioApp().getElementById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
popup(storedPopupIds[id]);
|
||||||
|
}
|
||||||
|
|
||||||
function extraNetworksShowMetadata(text) {
|
function extraNetworksShowMetadata(text) {
|
||||||
var elem = document.createElement('pre');
|
var elem = document.createElement('pre');
|
||||||
elem.classList.add('popup-metadata');
|
elem.classList.add('popup-metadata');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ onAfterUiUpdate(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const galleryPreviews = gradioApp().querySelectorAll('div[id^="tab_"][style*="display: block"] div[id$="_results"] .thumbnail-item > img');
|
const galleryPreviews = gradioApp().querySelectorAll('div[id^="tab_"] div[id$="_results"] .thumbnail-item > img');
|
||||||
|
|
||||||
if (galleryPreviews == null) return;
|
if (galleryPreviews == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,8 @@
|
|||||||
|
|
||||||
onUiLoaded(function() {
|
onUiLoaded(function() {
|
||||||
for (var elem of gradioApp().querySelectorAll('.resize-handle-row')) {
|
for (var elem of gradioApp().querySelectorAll('.resize-handle-row')) {
|
||||||
|
if (!elem.querySelector('.resize-handle')) {
|
||||||
setupResizeHandle(elem);
|
setupResizeHandle(elem);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,6 +25,13 @@ start = launch_utils.start
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if args.dump_sysinfo:
|
||||||
|
filename = launch_utils.dump_sysinfo()
|
||||||
|
|
||||||
|
print(f"Sysinfo saved as {filename}. Exiting...")
|
||||||
|
|
||||||
|
exit(0)
|
||||||
|
|
||||||
launch_utils.startup_timer.record("initial startup")
|
launch_utils.startup_timer.record("initial startup")
|
||||||
|
|
||||||
with launch_utils.startup_timer.subcategory("prepare environment"):
|
with launch_utils.startup_timer.subcategory("prepare environment"):
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ parser.add_argument("--test-server", action='store_true', help="launch.py argume
|
|||||||
parser.add_argument("--log-startup", action='store_true', help="launch.py argument: print a detailed log of what's happening at startup")
|
parser.add_argument("--log-startup", action='store_true', help="launch.py argument: print a detailed log of what's happening at startup")
|
||||||
parser.add_argument("--skip-prepare-environment", action='store_true', help="launch.py argument: skip all environment preparation")
|
parser.add_argument("--skip-prepare-environment", action='store_true', help="launch.py argument: skip all environment preparation")
|
||||||
parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages")
|
parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages")
|
||||||
|
parser.add_argument("--dump-sysinfo", action='store_true', help="launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit")
|
||||||
parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None)
|
parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None)
|
||||||
parser.add_argument("--do-not-download-clip", action='store_true', help="do not download CLIP model even if it's not included in the checkpoint")
|
parser.add_argument("--do-not-download-clip", action='store_true', help="do not download CLIP model even if it's not included in the checkpoint")
|
||||||
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored")
|
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored")
|
||||||
|
|||||||
+1
-1
@@ -95,7 +95,7 @@ def check_versions():
|
|||||||
|
|
||||||
expected_torch_version = "2.0.0"
|
expected_torch_version = "2.0.0"
|
||||||
expected_xformers_version = "0.0.20"
|
expected_xformers_version = "0.0.20"
|
||||||
expected_gradio_version = "3.41.0"
|
expected_gradio_version = "3.41.2"
|
||||||
|
|
||||||
if version.parse(torch.__version__) < version.parse(expected_torch_version):
|
if version.parse(torch.__version__) < version.parse(expected_torch_version):
|
||||||
print_error_explanation(f"""
|
print_error_explanation(f"""
|
||||||
|
|||||||
+43
-17
@@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import logging
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from modules import errors
|
from modules import errors
|
||||||
@@ -86,27 +87,55 @@ class ExtraNetwork:
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
|
def lookup_extra_networks(extra_network_data):
|
||||||
|
"""returns a dict mapping ExtraNetwork objects to lists of arguments for those extra networks.
|
||||||
|
|
||||||
|
Example input:
|
||||||
|
{
|
||||||
|
'lora': [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58310>],
|
||||||
|
'lyco': [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58F70>],
|
||||||
|
'hypernet': [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D5A800>]
|
||||||
|
}
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
{
|
||||||
|
<extra_networks_lora.ExtraNetworkLora object at 0x0000020581BEECE0>: [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58310>, <modules.extra_networks.ExtraNetworkParams object at 0x0000020690D58F70>],
|
||||||
|
<modules.extra_networks_hypernet.ExtraNetworkHypernet object at 0x0000020581BEEE60>: [<modules.extra_networks.ExtraNetworkParams object at 0x0000020690D5A800>]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
res = {}
|
||||||
|
|
||||||
|
for extra_network_name, extra_network_args in list(extra_network_data.items()):
|
||||||
|
extra_network = extra_network_registry.get(extra_network_name, None)
|
||||||
|
alias = extra_network_aliases.get(extra_network_name, None)
|
||||||
|
|
||||||
|
if alias is not None and extra_network is None:
|
||||||
|
extra_network = alias
|
||||||
|
|
||||||
|
if extra_network is None:
|
||||||
|
logging.info(f"Skipping unknown extra network: {extra_network_name}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
res.setdefault(extra_network, []).extend(extra_network_args)
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
def activate(p, extra_network_data):
|
def activate(p, extra_network_data):
|
||||||
"""call activate for extra networks in extra_network_data in specified order, then call
|
"""call activate for extra networks in extra_network_data in specified order, then call
|
||||||
activate for all remaining registered networks with an empty argument list"""
|
activate for all remaining registered networks with an empty argument list"""
|
||||||
|
|
||||||
activated = []
|
activated = []
|
||||||
|
|
||||||
for extra_network_name, extra_network_args in extra_network_data.items():
|
for extra_network, extra_network_args in lookup_extra_networks(extra_network_data).items():
|
||||||
extra_network = extra_network_registry.get(extra_network_name, None)
|
|
||||||
|
|
||||||
if extra_network is None:
|
|
||||||
extra_network = extra_network_aliases.get(extra_network_name, None)
|
|
||||||
|
|
||||||
if extra_network is None:
|
|
||||||
print(f"Skipping unknown extra network: {extra_network_name}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
extra_network.activate(p, extra_network_args)
|
extra_network.activate(p, extra_network_args)
|
||||||
activated.append(extra_network)
|
activated.append(extra_network)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.display(e, f"activating extra network {extra_network_name} with arguments {extra_network_args}")
|
errors.display(e, f"activating extra network {extra_network.name} with arguments {extra_network_args}")
|
||||||
|
|
||||||
for extra_network_name, extra_network in extra_network_registry.items():
|
for extra_network_name, extra_network in extra_network_registry.items():
|
||||||
if extra_network in activated:
|
if extra_network in activated:
|
||||||
@@ -125,19 +154,16 @@ def deactivate(p, extra_network_data):
|
|||||||
"""call deactivate for extra networks in extra_network_data in specified order, then call
|
"""call deactivate for extra networks in extra_network_data in specified order, then call
|
||||||
deactivate for all remaining registered networks"""
|
deactivate for all remaining registered networks"""
|
||||||
|
|
||||||
for extra_network_name in extra_network_data:
|
data = lookup_extra_networks(extra_network_data)
|
||||||
extra_network = extra_network_registry.get(extra_network_name, None)
|
|
||||||
if extra_network is None:
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
for extra_network in data:
|
||||||
try:
|
try:
|
||||||
extra_network.deactivate(p)
|
extra_network.deactivate(p)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.display(e, f"deactivating extra network {extra_network_name}")
|
errors.display(e, f"deactivating extra network {extra_network.name}")
|
||||||
|
|
||||||
for extra_network_name, extra_network in extra_network_registry.items():
|
for extra_network_name, extra_network in extra_network_registry.items():
|
||||||
args = extra_network_data.get(extra_network_name, None)
|
if extra_network in data:
|
||||||
if args is not None:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from modules.paths import data_path
|
|||||||
from modules import shared, ui_tempdir, script_callbacks, processing
|
from modules import shared, ui_tempdir, script_callbacks, processing
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
re_param_code = r'\s*([\w ]+):\s*("(?:\\"[^,]|\\"|\\|[^\"])+"|[^,]*)(?:,|$)'
|
re_param_code = r'\s*([\w ]+):\s*("(?:\\.|[^\\"])+"|[^,]*)(?:,|$)'
|
||||||
re_param = re.compile(re_param_code)
|
re_param = re.compile(re_param_code)
|
||||||
re_imagesize = re.compile(r"^(\d+)x(\d+)$")
|
re_imagesize = re.compile(r"^(\d+)x(\d+)$")
|
||||||
re_hypernet_hash = re.compile("\(([0-9a-f]+)\)$")
|
re_hypernet_hash = re.compile("\(([0-9a-f]+)\)$")
|
||||||
@@ -32,6 +32,7 @@ class ParamBinding:
|
|||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
paste_fields.clear()
|
paste_fields.clear()
|
||||||
|
registered_param_bindings.clear()
|
||||||
|
|
||||||
|
|
||||||
def quote(text):
|
def quote(text):
|
||||||
|
|||||||
+17
-11
@@ -228,7 +228,9 @@ def run_extension_installer(extension_dir):
|
|||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['PYTHONPATH'] = f"{os.path.abspath('.')}{os.pathsep}{env.get('PYTHONPATH', '')}"
|
env['PYTHONPATH'] = f"{os.path.abspath('.')}{os.pathsep}{env.get('PYTHONPATH', '')}"
|
||||||
|
|
||||||
print(run(f'"{python}" "{path_installer}"', errdesc=f"Error running install.py for extension {extension_dir}", custom_env=env))
|
stdout = run(f'"{python}" "{path_installer}"', errdesc=f"Error running install.py for extension {extension_dir}", custom_env=env).strip()
|
||||||
|
if stdout:
|
||||||
|
print(stdout)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.report(str(e))
|
errors.report(str(e))
|
||||||
|
|
||||||
@@ -366,17 +368,7 @@ def prepare_environment():
|
|||||||
startup_timer.record("install open_clip")
|
startup_timer.record("install open_clip")
|
||||||
|
|
||||||
if (not is_installed("xformers") or args.reinstall_xformers) and args.xformers:
|
if (not is_installed("xformers") or args.reinstall_xformers) and args.xformers:
|
||||||
if platform.system() == "Windows":
|
|
||||||
if platform.python_version().startswith("3.10"):
|
|
||||||
run_pip(f"install -U -I --no-deps {xformers_package}", "xformers", live=True)
|
|
||||||
else:
|
|
||||||
print("Installation of xformers is not supported in this version of Python.")
|
|
||||||
print("You can also check this and build manually: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers#building-xformers-on-windows-by-duckness")
|
|
||||||
if not is_installed("xformers"):
|
|
||||||
exit(0)
|
|
||||||
elif platform.system() == "Linux":
|
|
||||||
run_pip(f"install -U -I --no-deps {xformers_package}", "xformers")
|
run_pip(f"install -U -I --no-deps {xformers_package}", "xformers")
|
||||||
|
|
||||||
startup_timer.record("install xformers")
|
startup_timer.record("install xformers")
|
||||||
|
|
||||||
if not is_installed("ngrok") and args.ngrok:
|
if not is_installed("ngrok") and args.ngrok:
|
||||||
@@ -404,6 +396,7 @@ def prepare_environment():
|
|||||||
run_pip(f"install -r \"{requirements_file}\"", "requirements")
|
run_pip(f"install -r \"{requirements_file}\"", "requirements")
|
||||||
startup_timer.record("install requirements")
|
startup_timer.record("install requirements")
|
||||||
|
|
||||||
|
if not args.skip_install:
|
||||||
run_extensions_installers(settings_file=args.ui_settings_file)
|
run_extensions_installers(settings_file=args.ui_settings_file)
|
||||||
|
|
||||||
if args.update_check:
|
if args.update_check:
|
||||||
@@ -441,3 +434,16 @@ def start():
|
|||||||
webui.api_only()
|
webui.api_only()
|
||||||
else:
|
else:
|
||||||
webui.webui()
|
webui.webui()
|
||||||
|
|
||||||
|
|
||||||
|
def dump_sysinfo():
|
||||||
|
from modules import sysinfo
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
text = sysinfo.get()
|
||||||
|
filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.txt"
|
||||||
|
|
||||||
|
with open(filename, "w", encoding="utf8") as file:
|
||||||
|
file.write(text)
|
||||||
|
|
||||||
|
return filename
|
||||||
|
|||||||
+6
-12
@@ -91,8 +91,8 @@ def create_binary_mask(image):
|
|||||||
def txt2img_image_conditioning(sd_model, x, width, height):
|
def txt2img_image_conditioning(sd_model, x, width, height):
|
||||||
if sd_model.model.conditioning_key in {'hybrid', 'concat'}: # Inpainting models
|
if sd_model.model.conditioning_key in {'hybrid', 'concat'}: # Inpainting models
|
||||||
|
|
||||||
# The "masked-image" in this case will just be all zeros since the entire image is masked.
|
# The "masked-image" in this case will just be all 0.5 since the entire image is masked.
|
||||||
image_conditioning = torch.zeros(x.shape[0], 3, height, width, device=x.device)
|
image_conditioning = torch.ones(x.shape[0], 3, height, width, device=x.device) * 0.5
|
||||||
image_conditioning = images_tensor_to_samples(image_conditioning, approximation_indexes.get(opts.sd_vae_encode_method))
|
image_conditioning = images_tensor_to_samples(image_conditioning, approximation_indexes.get(opts.sd_vae_encode_method))
|
||||||
|
|
||||||
# Add the fake full 1s mask to the first dimension.
|
# Add the fake full 1s mask to the first dimension.
|
||||||
@@ -689,7 +689,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
|
|||||||
"Token merging ratio": None if token_merging_ratio == 0 else token_merging_ratio,
|
"Token merging ratio": None if token_merging_ratio == 0 else token_merging_ratio,
|
||||||
"Token merging ratio hr": None if not enable_hr or token_merging_ratio_hr == 0 else token_merging_ratio_hr,
|
"Token merging ratio hr": None if not enable_hr or token_merging_ratio_hr == 0 else token_merging_ratio_hr,
|
||||||
"Init image hash": getattr(p, 'init_img_hash', None),
|
"Init image hash": getattr(p, 'init_img_hash', None),
|
||||||
"RNG": opts.randn_source if opts.randn_source != "GPU" and opts.randn_source != "NV" else None,
|
"RNG": opts.randn_source if opts.randn_source != "GPU" else None,
|
||||||
"NGMS": None if p.s_min_uncond == 0 else p.s_min_uncond,
|
"NGMS": None if p.s_min_uncond == 0 else p.s_min_uncond,
|
||||||
"Tiling": "True" if p.tiling else None,
|
"Tiling": "True" if p.tiling else None,
|
||||||
**p.extra_generation_params,
|
**p.extra_generation_params,
|
||||||
@@ -1148,18 +1148,12 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
|
|||||||
else:
|
else:
|
||||||
decoded_samples = None
|
decoded_samples = None
|
||||||
|
|
||||||
current = shared.sd_model.sd_checkpoint_info
|
with sd_models.SkipWritingToConfig():
|
||||||
try:
|
|
||||||
if self.hr_checkpoint_info is not None:
|
|
||||||
self.sampler = None
|
|
||||||
sd_models.reload_model_weights(info=self.hr_checkpoint_info)
|
sd_models.reload_model_weights(info=self.hr_checkpoint_info)
|
||||||
|
|
||||||
devices.torch_gc()
|
devices.torch_gc()
|
||||||
|
|
||||||
return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts)
|
return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts)
|
||||||
finally:
|
|
||||||
self.sampler = None
|
|
||||||
sd_models.reload_model_weights(info=current)
|
|
||||||
devices.torch_gc()
|
|
||||||
|
|
||||||
def sample_hr_pass(self, samples, decoded_samples, seeds, subseeds, subseed_strength, prompts):
|
def sample_hr_pass(self, samples, decoded_samples, seeds, subseeds, subseed_strength, prompts):
|
||||||
if shared.state.interrupted:
|
if shared.state.interrupted:
|
||||||
@@ -1321,7 +1315,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
|
|||||||
if shared.opts.hires_fix_use_firstpass_conds:
|
if shared.opts.hires_fix_use_firstpass_conds:
|
||||||
self.calculate_hr_conds()
|
self.calculate_hr_conds()
|
||||||
|
|
||||||
elif lowvram.is_enabled(shared.sd_model): # if in lowvram mode, we need to calculate conds right away, before the cond NN is unloaded
|
elif lowvram.is_enabled(shared.sd_model) and shared.sd_model.sd_checkpoint_info == sd_models.select_checkpoint(): # if in lowvram mode, we need to calculate conds right away, before the cond NN is unloaded
|
||||||
with devices.autocast():
|
with devices.autocast():
|
||||||
extra_networks.activate(self, self.hr_extra_network_data)
|
extra_networks.activate(self, self.hr_extra_network_data)
|
||||||
|
|
||||||
|
|||||||
@@ -29,12 +29,15 @@ class ImageSaveParams:
|
|||||||
|
|
||||||
|
|
||||||
class ExtraNoiseParams:
|
class ExtraNoiseParams:
|
||||||
def __init__(self, noise, x):
|
def __init__(self, noise, x, xi):
|
||||||
self.noise = noise
|
self.noise = noise
|
||||||
"""Random noise generated by the seed"""
|
"""Random noise generated by the seed"""
|
||||||
|
|
||||||
self.x = x
|
self.x = x
|
||||||
"""Latent image representation of the image"""
|
"""Latent representation of the image"""
|
||||||
|
|
||||||
|
self.xi = xi
|
||||||
|
"""Noisy latent representation of the image"""
|
||||||
|
|
||||||
|
|
||||||
class CFGDenoiserParams:
|
class CFGDenoiserParams:
|
||||||
|
|||||||
+21
-1
@@ -27,6 +27,24 @@ checkpoint_alisases = checkpoint_aliases # for compatibility with old name
|
|||||||
checkpoints_loaded = collections.OrderedDict()
|
checkpoints_loaded = collections.OrderedDict()
|
||||||
|
|
||||||
|
|
||||||
|
def replace_key(d, key, new_key, value):
|
||||||
|
keys = list(d.keys())
|
||||||
|
|
||||||
|
d[new_key] = value
|
||||||
|
|
||||||
|
if key not in keys:
|
||||||
|
return d
|
||||||
|
|
||||||
|
index = keys.index(key)
|
||||||
|
keys[index] = new_key
|
||||||
|
|
||||||
|
new_d = {k: d[k] for k in keys}
|
||||||
|
|
||||||
|
d.clear()
|
||||||
|
d.update(new_d)
|
||||||
|
return d
|
||||||
|
|
||||||
|
|
||||||
class CheckpointInfo:
|
class CheckpointInfo:
|
||||||
def __init__(self, filename):
|
def __init__(self, filename):
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
@@ -91,9 +109,11 @@ class CheckpointInfo:
|
|||||||
if self.shorthash not in self.ids:
|
if self.shorthash not in self.ids:
|
||||||
self.ids += [self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]', f'{self.name_for_extra} [{self.shorthash}]']
|
self.ids += [self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]', f'{self.name_for_extra} [{self.shorthash}]']
|
||||||
|
|
||||||
checkpoints_list.pop(self.title, None)
|
old_title = self.title
|
||||||
self.title = f'{self.name} [{self.shorthash}]'
|
self.title = f'{self.name} [{self.shorthash}]'
|
||||||
self.short_title = f'{self.name_for_extra} [{self.shorthash}]'
|
self.short_title = f'{self.name_for_extra} [{self.shorthash}]'
|
||||||
|
|
||||||
|
replace_key(checkpoints_list, old_title, self.title, self)
|
||||||
self.register()
|
self.register()
|
||||||
|
|
||||||
return self.shorthash
|
return self.shorthash
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ def images_tensor_to_samples(image, approximation=None, model=None):
|
|||||||
else:
|
else:
|
||||||
if model is None:
|
if model is None:
|
||||||
model = shared.sd_model
|
model = shared.sd_model
|
||||||
|
model.first_stage_model.to(devices.dtype_vae)
|
||||||
|
|
||||||
image = image.to(shared.device, dtype=devices.dtype_vae)
|
image = image.to(shared.device, dtype=devices.dtype_vae)
|
||||||
image = image * 2 - 1
|
image = image * 2 - 1
|
||||||
if len(image) > 1:
|
if len(image) > 1:
|
||||||
@@ -164,9 +166,18 @@ def apply_refiner(cfg_denoiser):
|
|||||||
if refiner_checkpoint_info is None or shared.sd_model.sd_checkpoint_info == refiner_checkpoint_info:
|
if refiner_checkpoint_info is None or shared.sd_model.sd_checkpoint_info == refiner_checkpoint_info:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if getattr(cfg_denoiser.p, "enable_hr", False) and not cfg_denoiser.p.is_hr_pass:
|
if getattr(cfg_denoiser.p, "enable_hr", False):
|
||||||
|
is_second_pass = cfg_denoiser.p.is_hr_pass
|
||||||
|
|
||||||
|
if opts.hires_fix_refiner_pass == "first pass" and is_second_pass:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if opts.hires_fix_refiner_pass == "second pass" and not is_second_pass:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if opts.hires_fix_refiner_pass != "second pass":
|
||||||
|
cfg_denoiser.p.extra_generation_params['Hires refiner'] = opts.hires_fix_refiner_pass
|
||||||
|
|
||||||
cfg_denoiser.p.extra_generation_params['Refiner'] = refiner_checkpoint_info.short_title
|
cfg_denoiser.p.extra_generation_params['Refiner'] = refiner_checkpoint_info.short_title
|
||||||
cfg_denoiser.p.extra_generation_params['Refiner switch at'] = refiner_switch_at
|
cfg_denoiser.p.extra_generation_params['Refiner switch at'] = refiner_switch_at
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
|
|||||||
|
|
||||||
if opts.img2img_extra_noise > 0:
|
if opts.img2img_extra_noise > 0:
|
||||||
p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise
|
p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise
|
||||||
extra_noise_params = ExtraNoiseParams(noise, x)
|
extra_noise_params = ExtraNoiseParams(noise, x, xi)
|
||||||
extra_noise_callback(extra_noise_params)
|
extra_noise_callback(extra_noise_params)
|
||||||
noise = extra_noise_params.noise
|
noise = extra_noise_params.noise
|
||||||
xi += noise * opts.img2img_extra_noise
|
xi += noise * opts.img2img_extra_noise
|
||||||
@@ -197,6 +197,10 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
|
|||||||
|
|
||||||
sigmas = self.get_sigmas(p, steps)
|
sigmas = self.get_sigmas(p, steps)
|
||||||
|
|
||||||
|
if opts.sgm_noise_multiplier:
|
||||||
|
p.extra_generation_params["SGM noise multiplier"] = True
|
||||||
|
x = x * torch.sqrt(1.0 + sigmas[0] ** 2.0)
|
||||||
|
else:
|
||||||
x = x * sigmas[0]
|
x = x * sigmas[0]
|
||||||
|
|
||||||
extra_params_kwargs = self.initialize(p)
|
extra_params_kwargs = self.initialize(p)
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class CompVisSampler(sd_samplers_common.Sampler):
|
|||||||
|
|
||||||
if opts.img2img_extra_noise > 0:
|
if opts.img2img_extra_noise > 0:
|
||||||
p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise
|
p.extra_generation_params["Extra noise"] = opts.img2img_extra_noise
|
||||||
extra_noise_params = ExtraNoiseParams(noise, x)
|
extra_noise_params = ExtraNoiseParams(noise, x, xi)
|
||||||
extra_noise_callback(extra_noise_params)
|
extra_noise_callback(extra_noise_params)
|
||||||
noise = extra_noise_params.noise
|
noise = extra_noise_params.noise
|
||||||
xi += noise * opts.img2img_extra_noise * sqrt_alpha_cumprod
|
xi += noise * opts.img2img_extra_noise * sqrt_alpha_cumprod
|
||||||
|
|||||||
+1
-1
@@ -159,7 +159,7 @@ def resolve_vae_from_user_metadata(checkpoint_file) -> VaeResolution:
|
|||||||
|
|
||||||
def resolve_vae_near_checkpoint(checkpoint_file) -> VaeResolution:
|
def resolve_vae_near_checkpoint(checkpoint_file) -> VaeResolution:
|
||||||
vae_near_checkpoint = find_vae_near_checkpoint(checkpoint_file)
|
vae_near_checkpoint = find_vae_near_checkpoint(checkpoint_file)
|
||||||
if vae_near_checkpoint is not None and (not shared.opts.sd_vae_overrides_per_model_preferences or is_automatic):
|
if vae_near_checkpoint is not None and (not shared.opts.sd_vae_overrides_per_model_preferences or is_automatic()):
|
||||||
return VaeResolution(vae_near_checkpoint, 'found near the checkpoint')
|
return VaeResolution(vae_near_checkpoint, 'found near the checkpoint')
|
||||||
|
|
||||||
return VaeResolution(resolved=False)
|
return VaeResolution(resolved=False)
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ else:
|
|||||||
cmd_opts, _ = parser.parse_known_args()
|
cmd_opts, _ = parser.parse_known_args()
|
||||||
|
|
||||||
|
|
||||||
cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or cmd_opts.server_name) and not cmd_opts.enable_insecure_extension_access
|
cmd_opts.disable_extension_access = any([cmd_opts.share, cmd_opts.listen, cmd_opts.ngrok, cmd_opts.server_name]) and not cmd_opts.enable_insecure_extension_access
|
||||||
|
|||||||
@@ -144,8 +144,9 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), {
|
|||||||
"comma_padding_backtrack": OptionInfo(20, "Prompt word wrap length limit", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1}).info("in tokens - for texts shorter than specified, if they don't fit into 75 token limit, move them to the next 75 token chunk"),
|
"comma_padding_backtrack": OptionInfo(20, "Prompt word wrap length limit", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1}).info("in tokens - for texts shorter than specified, if they don't fit into 75 token limit, move them to the next 75 token chunk"),
|
||||||
"CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1}, infotext="Clip skip").link("wiki", "https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#clip-skip").info("ignore last layers of CLIP network; 1 ignores none, 2 ignores one layer"),
|
"CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1}, infotext="Clip skip").link("wiki", "https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#clip-skip").info("ignore last layers of CLIP network; 1 ignores none, 2 ignores one layer"),
|
||||||
"upcast_attn": OptionInfo(False, "Upcast cross attention layer to float32"),
|
"upcast_attn": OptionInfo(False, "Upcast cross attention layer to float32"),
|
||||||
"randn_source": OptionInfo("GPU", "Random number generator source.", gr.Radio, {"choices": ["GPU", "CPU", "NV"]}).info("changes seeds drastically; use CPU to produce the same picture across different videocard vendors; use NV to produce same picture as on NVidia videocards"),
|
"randn_source": OptionInfo("GPU", "Random number generator source.", gr.Radio, {"choices": ["GPU", "CPU", "NV"]}, infotext="RNG").info("changes seeds drastically; use CPU to produce the same picture across different videocard vendors; use NV to produce same picture as on NVidia videocards"),
|
||||||
"tiling": OptionInfo(False, "Tiling", infotext='Tiling').info("produce a tileable picture"),
|
"tiling": OptionInfo(False, "Tiling", infotext='Tiling').info("produce a tileable picture"),
|
||||||
|
"hires_fix_refiner_pass": OptionInfo("second pass", "Hires fix: which pass to enable refiner for", gr.Radio, {"choices": ["first pass", "second pass", "both passes"]}, infotext="Hires refiner"),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
options_templates.update(options_section(('sdxl', "Stable Diffusion XL"), {
|
options_templates.update(options_section(('sdxl', "Stable Diffusion XL"), {
|
||||||
@@ -309,6 +310,7 @@ options_templates.update(options_section(('sampler-params', "Sampler parameters"
|
|||||||
'rho': OptionInfo(0.0, "rho", gr.Number, infotext='Schedule rho').info("0 = default (7 for karras, 1 for polyexponential); higher values result in a steeper noise schedule (decreases faster)"),
|
'rho': OptionInfo(0.0, "rho", gr.Number, infotext='Schedule rho').info("0 = default (7 for karras, 1 for polyexponential); higher values result in a steeper noise schedule (decreases faster)"),
|
||||||
'eta_noise_seed_delta': OptionInfo(0, "Eta noise seed delta", gr.Number, {"precision": 0}, infotext='ENSD').info("ENSD; does not improve anything, just produces different results for ancestral samplers - only useful for reproducing images"),
|
'eta_noise_seed_delta': OptionInfo(0, "Eta noise seed delta", gr.Number, {"precision": 0}, infotext='ENSD').info("ENSD; does not improve anything, just produces different results for ancestral samplers - only useful for reproducing images"),
|
||||||
'always_discard_next_to_last_sigma': OptionInfo(False, "Always discard next-to-last sigma", infotext='Discard penultimate sigma').link("PR", "https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/6044"),
|
'always_discard_next_to_last_sigma': OptionInfo(False, "Always discard next-to-last sigma", infotext='Discard penultimate sigma').link("PR", "https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/6044"),
|
||||||
|
'sgm_noise_multiplier': OptionInfo(False, "SGM noise multiplier", infotext='SGM noise multplier').link("PR", "https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12818").info("Match initial noise to official SDXL implementation - only useful for reproducing images"),
|
||||||
'uni_pc_variant': OptionInfo("bh1", "UniPC variant", gr.Radio, {"choices": ["bh1", "bh2", "vary_coeff"]}, infotext='UniPC variant'),
|
'uni_pc_variant': OptionInfo("bh1", "UniPC variant", gr.Radio, {"choices": ["bh1", "bh2", "vary_coeff"]}, infotext='UniPC variant'),
|
||||||
'uni_pc_skip_type': OptionInfo("time_uniform", "UniPC skip type", gr.Radio, {"choices": ["time_uniform", "time_quadratic", "logSNR"]}, infotext='UniPC skip type'),
|
'uni_pc_skip_type': OptionInfo("time_uniform", "UniPC skip type", gr.Radio, {"choices": ["time_uniform", "time_quadratic", "logSNR"]}, infotext='UniPC skip type'),
|
||||||
'uni_pc_order': OptionInfo(3, "UniPC order", gr.Slider, {"minimum": 1, "maximum": 50, "step": 1}, infotext='UniPC order').info("must be < sampling steps"),
|
'uni_pc_order': OptionInfo(3, "UniPC order", gr.Slider, {"minimum": 1, "maximum": 50, "step": 1}, infotext='UniPC order').info("must be < sampling steps"),
|
||||||
|
|||||||
+17
-1
@@ -82,7 +82,7 @@ def get_dict():
|
|||||||
"Data path": paths_internal.data_path,
|
"Data path": paths_internal.data_path,
|
||||||
"Extensions dir": paths_internal.extensions_dir,
|
"Extensions dir": paths_internal.extensions_dir,
|
||||||
"Checksum": checksum_token,
|
"Checksum": checksum_token,
|
||||||
"Commandline": sys.argv,
|
"Commandline": get_argv(),
|
||||||
"Torch env info": get_torch_sysinfo(),
|
"Torch env info": get_torch_sysinfo(),
|
||||||
"Exceptions": get_exceptions(),
|
"Exceptions": get_exceptions(),
|
||||||
"CPU": {
|
"CPU": {
|
||||||
@@ -123,6 +123,22 @@ def get_environment():
|
|||||||
return {k: os.environ[k] for k in sorted(os.environ) if k in environment_whitelist}
|
return {k: os.environ[k] for k in sorted(os.environ) if k in environment_whitelist}
|
||||||
|
|
||||||
|
|
||||||
|
def get_argv():
|
||||||
|
res = []
|
||||||
|
|
||||||
|
for v in sys.argv:
|
||||||
|
if shared.cmd_opts.gradio_auth and shared.cmd_opts.gradio_auth == v:
|
||||||
|
res.append("<hidden>")
|
||||||
|
continue
|
||||||
|
|
||||||
|
if shared.cmd_opts.api_auth and shared.cmd_opts.api_auth == v:
|
||||||
|
res.append("<hidden>")
|
||||||
|
continue
|
||||||
|
|
||||||
|
res.append(v)
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
re_newline = re.compile(r"\r*\n")
|
re_newline = re.compile(r"\r*\n")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -1279,10 +1279,7 @@ def create_ui():
|
|||||||
with gr.TabItem(label, id=ifid, elem_id=f"tab_{ifid}"):
|
with gr.TabItem(label, id=ifid, elem_id=f"tab_{ifid}"):
|
||||||
interface.render()
|
interface.render()
|
||||||
|
|
||||||
for interface, _label, ifid in interfaces:
|
if ifid not in ["extensions", "settings"]:
|
||||||
if ifid in ["extensions", "settings"]:
|
|
||||||
continue
|
|
||||||
|
|
||||||
loadsave.add_block(interface, ifid)
|
loadsave.add_block(interface, ifid)
|
||||||
|
|
||||||
loadsave.add_component(f"webui/Tabs@{tabs.elem_id}", tabs)
|
loadsave.add_component(f"webui/Tabs@{tabs.elem_id}", tabs)
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ def setup_dialog(button_show, dialog, *, button_close=None):
|
|||||||
fn=lambda: gr.update(visible=True),
|
fn=lambda: gr.update(visible=True),
|
||||||
inputs=[],
|
inputs=[],
|
||||||
outputs=[dialog],
|
outputs=[dialog],
|
||||||
).then(fn=None, _js="function(){ popup(gradioApp().getElementById('" + dialog.elem_id + "')); }")
|
).then(fn=None, _js="function(){ popupId('" + dialog.elem_id + "'); }")
|
||||||
|
|
||||||
if button_close:
|
if button_close:
|
||||||
button_close.click(fn=None, _js="closePopup")
|
button_close.click(fn=None, _js="closePopup")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
import git
|
import git
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ def extension_table():
|
|||||||
<td>{remote}</td>
|
<td>{remote}</td>
|
||||||
<td>{ext.branch}</td>
|
<td>{ext.branch}</td>
|
||||||
<td>{version_link}</td>
|
<td>{version_link}</td>
|
||||||
<td>{time.asctime(time.gmtime(ext.commit_date))}</td>
|
<td>{datetime.fromtimestamp(ext.commit_date) if ext.commit_date else ""}</td>
|
||||||
<td{' class="extension_status"' if ext.remote is not None else ''}>{ext_status}</td>
|
<td{' class="extension_status"' if ext.remote is not None else ''}>{ext_status}</td>
|
||||||
</tr>
|
</tr>
|
||||||
"""
|
"""
|
||||||
@@ -442,7 +442,7 @@ sort_ordering = [
|
|||||||
|
|
||||||
def get_date(info: dict, key):
|
def get_date(info: dict, key):
|
||||||
try:
|
try:
|
||||||
return datetime.strptime(info.get(key), "%Y-%m-%dT%H:%M:%SZ").strftime("%Y-%m-%d")
|
return datetime.strptime(info.get(key), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc).astimezone().strftime("%Y-%m-%d")
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
@@ -557,8 +557,12 @@ def create_ui():
|
|||||||
msg = '"--disable-extra-extensions" was used, remove it to load all extensions again'
|
msg = '"--disable-extra-extensions" was used, remove it to load all extensions again'
|
||||||
html = f'<span style="color: var(--primary-400);">{msg}</span>'
|
html = f'<span style="color: var(--primary-400);">{msg}</span>'
|
||||||
|
|
||||||
|
with gr.Row():
|
||||||
info = gr.HTML(html)
|
info = gr.HTML(html)
|
||||||
extensions_table = gr.HTML('Loading...')
|
|
||||||
|
with gr.Row(elem_classes="progress-container"):
|
||||||
|
extensions_table = gr.HTML('Loading...', elem_id="extensions_installed_html")
|
||||||
|
|
||||||
ui.load(fn=extension_table, inputs=[], outputs=[extensions_table])
|
ui.load(fn=extension_table, inputs=[], outputs=[extensions_table])
|
||||||
|
|
||||||
apply.click(
|
apply.click(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import os.path
|
|||||||
|
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
|
|
||||||
from modules import generation_parameters_copypaste, images, sysinfo, errors
|
from modules import generation_parameters_copypaste, images, sysinfo, errors, ui_extra_networks
|
||||||
|
|
||||||
|
|
||||||
class UserMetadataEditor:
|
class UserMetadataEditor:
|
||||||
@@ -89,6 +89,13 @@ class UserMetadataEditor:
|
|||||||
|
|
||||||
return preview
|
return preview
|
||||||
|
|
||||||
|
def relative_path(self, path):
|
||||||
|
for parent_path in self.page.allowed_directories_for_previews():
|
||||||
|
if ui_extra_networks.path_is_parent(parent_path, path):
|
||||||
|
return os.path.relpath(path, parent_path)
|
||||||
|
|
||||||
|
return os.path.basename(path)
|
||||||
|
|
||||||
def get_metadata_table(self, name):
|
def get_metadata_table(self, name):
|
||||||
item = self.page.items.get(name, {})
|
item = self.page.items.get(name, {})
|
||||||
try:
|
try:
|
||||||
@@ -97,7 +104,7 @@ class UserMetadataEditor:
|
|||||||
|
|
||||||
stats = os.stat(filename)
|
stats = os.stat(filename)
|
||||||
params = [
|
params = [
|
||||||
('Filename: ', os.path.basename(filename)),
|
('Filename: ', self.relative_path(filename)),
|
||||||
('File size: ', sysinfo.pretty_bytes(stats.st_size)),
|
('File size: ', sysinfo.pretty_bytes(stats.st_size)),
|
||||||
('Hash: ', shorthash),
|
('Hash: ', shorthash),
|
||||||
('Modified: ', datetime.datetime.fromtimestamp(stats.st_mtime).strftime('%Y-%m-%d %H:%M')),
|
('Modified: ', datetime.datetime.fromtimestamp(stats.st_mtime).strftime('%Y-%m-%d %H:%M')),
|
||||||
|
|||||||
+13
-4
@@ -7,6 +7,10 @@ from modules import errors
|
|||||||
from modules.ui_components import ToolButton
|
from modules.ui_components import ToolButton
|
||||||
|
|
||||||
|
|
||||||
|
def radio_choices(comp): # gradio 3.41 changes choices from list of values to list of pairs
|
||||||
|
return [x[0] if isinstance(x, tuple) else x for x in getattr(comp, 'choices', [])]
|
||||||
|
|
||||||
|
|
||||||
class UiLoadsave:
|
class UiLoadsave:
|
||||||
"""allows saving and restoring default values for gradio components"""
|
"""allows saving and restoring default values for gradio components"""
|
||||||
|
|
||||||
@@ -28,6 +32,8 @@ class UiLoadsave:
|
|||||||
self.error_loading = True
|
self.error_loading = True
|
||||||
errors.display(e, "loading settings")
|
errors.display(e, "loading settings")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def add_component(self, path, x):
|
def add_component(self, path, x):
|
||||||
"""adds component to the registry of tracked components"""
|
"""adds component to the registry of tracked components"""
|
||||||
|
|
||||||
@@ -73,7 +79,7 @@ class UiLoadsave:
|
|||||||
apply_field(x, 'step')
|
apply_field(x, 'step')
|
||||||
|
|
||||||
if type(x) == gr.Radio:
|
if type(x) == gr.Radio:
|
||||||
apply_field(x, 'value', lambda val: val in x.choices)
|
apply_field(x, 'value', lambda val: val in radio_choices(x))
|
||||||
|
|
||||||
if type(x) == gr.Checkbox:
|
if type(x) == gr.Checkbox:
|
||||||
apply_field(x, 'value')
|
apply_field(x, 'value')
|
||||||
@@ -86,10 +92,11 @@ class UiLoadsave:
|
|||||||
|
|
||||||
if type(x) == gr.Dropdown:
|
if type(x) == gr.Dropdown:
|
||||||
def check_dropdown(val):
|
def check_dropdown(val):
|
||||||
|
choices = radio_choices(x)
|
||||||
if getattr(x, 'multiselect', False):
|
if getattr(x, 'multiselect', False):
|
||||||
return all(value in x.choices for value in val)
|
return all(value in choices for value in val)
|
||||||
else:
|
else:
|
||||||
return val in x.choices
|
return val in choices
|
||||||
|
|
||||||
apply_field(x, 'value', check_dropdown, getattr(x, 'init_field', None))
|
apply_field(x, 'value', check_dropdown, getattr(x, 'init_field', None))
|
||||||
|
|
||||||
@@ -146,12 +153,14 @@ class UiLoadsave:
|
|||||||
for (path, component), new_value in zip(self.component_mapping.items(), values):
|
for (path, component), new_value in zip(self.component_mapping.items(), values):
|
||||||
old_value = current_ui_settings.get(path)
|
old_value = current_ui_settings.get(path)
|
||||||
|
|
||||||
choices = getattr(component, 'choices', None)
|
choices = radio_choices(component)
|
||||||
if isinstance(new_value, int) and choices:
|
if isinstance(new_value, int) and choices:
|
||||||
if new_value >= len(choices):
|
if new_value >= len(choices):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
new_value = choices[new_value]
|
new_value = choices[new_value]
|
||||||
|
if isinstance(new_value, tuple):
|
||||||
|
new_value = new_value[0]
|
||||||
|
|
||||||
if new_value == old_value:
|
if new_value == old_value:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class UiSettings:
|
|||||||
if not opts.same_type(value, opts.data_labels[key].default):
|
if not opts.same_type(value, opts.data_labels[key].default):
|
||||||
return gr.update(visible=True), opts.dumpjson()
|
return gr.update(visible=True), opts.dumpjson()
|
||||||
|
|
||||||
if not opts.set(key, value):
|
if value is None or not opts.set(key, value):
|
||||||
return gr.update(value=getattr(opts, key)), opts.dumpjson()
|
return gr.update(value=getattr(opts, key)), opts.dumpjson()
|
||||||
|
|
||||||
opts.save(shared.config_filename)
|
opts.save(shared.config_filename)
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ clean-fid
|
|||||||
einops
|
einops
|
||||||
fastapi>=0.90.1
|
fastapi>=0.90.1
|
||||||
gfpgan
|
gfpgan
|
||||||
gradio==3.41.0
|
gradio==3.41.2
|
||||||
inflection
|
inflection
|
||||||
jsonmerge
|
jsonmerge
|
||||||
kornia
|
kornia
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ clean-fid==0.1.35
|
|||||||
einops==0.4.1
|
einops==0.4.1
|
||||||
fastapi==0.94.0
|
fastapi==0.94.0
|
||||||
gfpgan==1.3.8
|
gfpgan==1.3.8
|
||||||
gradio==3.41.0
|
gradio==3.41.2
|
||||||
httpcore==0.15
|
httpcore==0.15
|
||||||
inflection==0.5.1
|
inflection==0.5.1
|
||||||
jsonmerge==1.8.0
|
jsonmerge==1.8.0
|
||||||
@@ -29,3 +29,4 @@ torch
|
|||||||
torchdiffeq==0.2.3
|
torchdiffeq==0.2.3
|
||||||
torchsde==0.2.5
|
torchsde==0.2.5
|
||||||
transformers==4.30.2
|
transformers==4.30.2
|
||||||
|
httpx==0.24.1
|
||||||
|
|||||||
+4
-3
@@ -238,9 +238,9 @@ axis_options = [
|
|||||||
AxisOptionImg2Img("Image CFG Scale", float, apply_field("image_cfg_scale")),
|
AxisOptionImg2Img("Image CFG Scale", float, apply_field("image_cfg_scale")),
|
||||||
AxisOption("Prompt S/R", str, apply_prompt, format_value=format_value),
|
AxisOption("Prompt S/R", str, apply_prompt, format_value=format_value),
|
||||||
AxisOption("Prompt order", str_permutations, apply_order, format_value=format_value_join_list),
|
AxisOption("Prompt order", str_permutations, apply_order, format_value=format_value_join_list),
|
||||||
AxisOptionTxt2Img("Sampler", str, apply_field("sampler_name"), format_value=format_value, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers]),
|
AxisOptionTxt2Img("Sampler", str, apply_field("sampler_name"), format_value=format_value, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers if x.name not in opts.hide_samplers]),
|
||||||
AxisOptionTxt2Img("Hires sampler", str, apply_field("hr_sampler_name"), confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers_for_img2img]),
|
AxisOptionTxt2Img("Hires sampler", str, apply_field("hr_sampler_name"), confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers_for_img2img if x.name not in opts.hide_samplers]),
|
||||||
AxisOptionImg2Img("Sampler", str, apply_field("sampler_name"), format_value=format_value, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers_for_img2img]),
|
AxisOptionImg2Img("Sampler", str, apply_field("sampler_name"), format_value=format_value, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers_for_img2img if x.name not in opts.hide_samplers]),
|
||||||
AxisOption("Checkpoint name", str, apply_checkpoint, format_value=format_remove_path, confirm=confirm_checkpoints, cost=1.0, choices=lambda: sorted(sd_models.checkpoints_list, key=str.casefold)),
|
AxisOption("Checkpoint name", str, apply_checkpoint, format_value=format_remove_path, confirm=confirm_checkpoints, cost=1.0, choices=lambda: sorted(sd_models.checkpoints_list, key=str.casefold)),
|
||||||
AxisOption("Negative Guidance minimum sigma", float, apply_field("s_min_uncond")),
|
AxisOption("Negative Guidance minimum sigma", float, apply_field("s_min_uncond")),
|
||||||
AxisOption("Sigma Churn", float, apply_field("s_churn")),
|
AxisOption("Sigma Churn", float, apply_field("s_churn")),
|
||||||
@@ -265,6 +265,7 @@ axis_options = [
|
|||||||
AxisOption("Token merging ratio", float, apply_override('token_merging_ratio')),
|
AxisOption("Token merging ratio", float, apply_override('token_merging_ratio')),
|
||||||
AxisOption("Token merging ratio high-res", float, apply_override('token_merging_ratio_hr')),
|
AxisOption("Token merging ratio high-res", float, apply_override('token_merging_ratio_hr')),
|
||||||
AxisOption("Always discard next-to-last sigma", str, apply_override('always_discard_next_to_last_sigma', boolean=True), choices=boolean_choice(reverse=True)),
|
AxisOption("Always discard next-to-last sigma", str, apply_override('always_discard_next_to_last_sigma', boolean=True), choices=boolean_choice(reverse=True)),
|
||||||
|
AxisOption("SGM noise multiplier", str, apply_override('sgm_noise_multiplier', boolean=True), choices=boolean_choice(reverse=True)),
|
||||||
AxisOption("Refiner checkpoint", str, apply_field('refiner_checkpoint'), format_value=format_remove_path, confirm=confirm_checkpoints_or_none, cost=1.0, choices=lambda: ['None'] + sorted(sd_models.checkpoints_list, key=str.casefold)),
|
AxisOption("Refiner checkpoint", str, apply_field('refiner_checkpoint'), format_value=format_remove_path, confirm=confirm_checkpoints_or_none, cost=1.0, choices=lambda: ['None'] + sorted(sd_models.checkpoints_list, key=str.casefold)),
|
||||||
AxisOption("Refiner switch at", float, apply_field('refiner_switch_at')),
|
AxisOption("Refiner switch at", float, apply_field('refiner_switch_at')),
|
||||||
AxisOption("RNG source", str, apply_override("randn_source"), choices=lambda: ["GPU", "CPU", "NV"]),
|
AxisOption("RNG source", str, apply_override("randn_source"), choices=lambda: ["GPU", "CPU", "NV"]),
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap');
|
||||||
|
|
||||||
|
|
||||||
|
/* temporary fix to hide gradio crop tool until it's fixed https://github.com/gradio-app/gradio/issues/3810 */
|
||||||
|
|
||||||
|
div.gradio-image button[aria-label="Edit"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* general gradio fixes */
|
/* general gradio fixes */
|
||||||
|
|
||||||
:root, .dark{
|
:root, .dark{
|
||||||
@@ -509,6 +517,11 @@ table.popup-table .link{
|
|||||||
background: #b4c0cc;
|
background: #b4c0cc;
|
||||||
border-radius: 3px !important;
|
border-radius: 3px !important;
|
||||||
top: -20px;
|
top: -20px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-container{
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
[id$=_results].mobile{
|
[id$=_results].mobile{
|
||||||
@@ -613,6 +626,9 @@ table.popup-table .link{
|
|||||||
|
|
||||||
.modalControls {
|
.modalControls {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
left: 0px;
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background-color:rgba(0,0,0,0);
|
background-color:rgba(0,0,0,0);
|
||||||
@@ -652,13 +668,6 @@ table.popup-table .link{
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#modalImage{
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%) translateY(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modalPrev,
|
.modalPrev,
|
||||||
.modalNext {
|
.modalNext {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -1001,6 +1010,8 @@ div.block.gradio-box.edit-user-metadata {
|
|||||||
|
|
||||||
.edit-user-metadata .file-metadata th, .edit-user-metadata .file-metadata td{
|
.edit-user-metadata .file-metadata th, .edit-user-metadata .file-metadata td{
|
||||||
padding: 0.3em 1em;
|
padding: 0.3em 1em;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-user-metadata .wrap.translucent{
|
.edit-user-metadata .wrap.translucent{
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ def webui():
|
|||||||
if shared.opts.auto_launch_browser == "Remote" or cmd_opts.autolaunch:
|
if shared.opts.auto_launch_browser == "Remote" or cmd_opts.autolaunch:
|
||||||
auto_launch_browser = True
|
auto_launch_browser = True
|
||||||
elif shared.opts.auto_launch_browser == "Local":
|
elif shared.opts.auto_launch_browser == "Local":
|
||||||
auto_launch_browser = not any([cmd_opts.listen, cmd_opts.share, cmd_opts.ngrok])
|
auto_launch_browser = not any([cmd_opts.listen, cmd_opts.share, cmd_opts.ngrok, cmd_opts.server_name])
|
||||||
|
|
||||||
app, local_url, share_url = shared.demo.launch(
|
app, local_url, share_url = shared.demo.launch(
|
||||||
share=cmd_opts.share,
|
share=cmd_opts.share,
|
||||||
|
|||||||
Reference in New Issue
Block a user