This commit is contained in:
Vladimir Mandic
2023-06-13 13:04:27 -04:00
parent 1d9e490ef9
commit 4951ed15f2
6 changed files with 15 additions and 18 deletions
+2
View File
@@ -147,6 +147,8 @@ disable=raw-checker-failed,
too-many-nested-blocks,
useless-suppression,
wrong-import-position,
import-error,
simplifiable-if-expression
enable=c-extension-no-member
[METHOD_ARGS]
+1
View File
@@ -12,6 +12,7 @@ Both some **new functionality** as well as **massive merges** from upstream
- ability to run server without loaded model
default is to auto-load model on startup, can be changed in settings -> stable diffusion
if disabled, model will be loaded on first request, e.g. when you click generate
this is useful when you want to start server to perform other tasks like upscaling which do not rely on model
- updated `accelerate` and `xformers`
- huge nubmer of changes ported from **A1111** upstream
this was a massive merge
+4 -8
View File
@@ -223,7 +223,7 @@ def clone(url, folder, commithash=None):
def check_python():
supported_minors = [9, 10]
if args.quick:
return True
return
if args.experimental:
supported_minors.append(11)
log.info(f'Python {platform.python_version()} on {platform.system()}')
@@ -245,7 +245,7 @@ def check_python():
# check torch version
def check_torch():
if args.quick:
return True
return
if args.profile:
pr = cProfile.Profile()
pr.enable()
@@ -350,7 +350,7 @@ def check_torch():
# check modified files
def check_modified_files():
if args.quick:
return True
return
if args.skip_git:
return
try:
@@ -609,11 +609,7 @@ def check_version(offline=False, reset=True): # pylint: disable=unused-argument
sys.exit(1)
ver = git('log -1 --pretty=format:"%h %ad"')
log.info(f'Version: {ver}')
if args.quick:
return True
if args.version:
return
if args.skip_git:
if args.quick or args.version or args.skip_git:
return
commit = git('rev-parse HEAD')
global git_commit # pylint: disable=global-statement
+6 -8
View File
@@ -13,7 +13,7 @@ from modules.paths_internal import models_path, script_path, data_path, sd_confi
import modules.interrogate
import modules.memmon
import modules.styles
import modules.devices as devices
import modules.devices as devices # pylint: disable=R0402
import modules.paths_internal as paths
from installer import log as central_logger # pylint: disable=E0611
@@ -558,7 +558,7 @@ class Options:
def __init__(self):
self.data = {k: v.default for k, v in self.data_labels.items()}
def __setattr__(self, key, value):
def __setattr__(self, key, value): # pylint: disable=inconsistent-return-statements
if self.data is not None:
if key in self.data or key in self.data_labels:
if cmd_opts.freeze:
@@ -567,11 +567,9 @@ class Options:
if cmd_opts.hide_ui_dir_config and key in restricted_opts:
log.warning(f'Settings key is restricted: {key}')
return
else:
self.data[key] = value
self.data[key] = value
return
return super(Options, self).__setattr__(key, value)
return super(Options, self).__setattr__(key, value) # pylint: disable=super-with-arguments
def __getattr__(self, item):
if self.data is not None:
@@ -579,7 +577,7 @@ class Options:
return self.data[item]
if item in self.data_labels:
return self.data_labels[item].default
return super(Options, self).__getattribute__(item)
return super(Options, self).__getattribute__(item) # pylint: disable=super-with-arguments
def set(self, key, value):
"""sets an option and calls its onchange callback, returning True if the option changed and False otherwise"""
@@ -719,7 +717,7 @@ def reload_gradio_theme(theme_name=None):
res = 0
try:
req = urllib.request.Request("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono", method="HEAD")
res = urllib.request.urlopen(req, timeout=3.0).status
res = urllib.request.urlopen(req, timeout=3.0).status # pylint: disable=consider-using-with
except Exception:
res = 0
if res != 200:
+1 -1
View File
@@ -710,7 +710,7 @@ def create_ui():
inpaint_full_res_padding = gr.Slider(label='Only masked padding, pixels', minimum=0, maximum=256, step=4, value=32, elem_id="img2img_inpaint_full_res_padding")
def select_img2img_tab(tab):
return gr.update(visible=tab in [2, 3, 4]), gr.update(visible=tab == 3),
return gr.update(visible=tab in [2, 3, 4]), gr.update(visible=tab == 3)
for i, elem in enumerate(img2img_tabs):
elem.select(
+1 -1
View File
@@ -36,7 +36,7 @@ startup_timer.record("gradio")
errors.install([gradio])
errors.log.debug('Loading Modules')
import ldm.modules.encoders.modules # pylint: disable=W0611,C0411
import ldm.modules.encoders.modules # pylint: disable=W0611,C0411,E0401
from modules import extra_networks, ui_extra_networks_checkpoints # pylint: disable=C0411,C0412
from modules import extra_networks_hypernet, ui_extra_networks_hypernets, ui_extra_networks_textual_inversion
from modules.call_queue import queue_lock, wrap_queued_call, wrap_gradio_gpu_call # pylint: disable=W0611,C0411