mirror of https://github.com/vladmandic/automatic
enable quick launch
parent
71e3abc4a4
commit
fd51bb90d0
|
|
@ -134,6 +134,8 @@ disable=raw-checker-failed,
|
|||
logging-fstring-interpolation,
|
||||
import-outside-toplevel,
|
||||
consider-iterating-dictionary,
|
||||
wrong-import-position,
|
||||
unnecessary-lambda,
|
||||
enable=c-extension-no-member
|
||||
|
||||
[METHOD_ARGS]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
"python.analysis.extraPaths": [
|
||||
".",
|
||||
"./modules",
|
||||
"./modules/lora",
|
||||
"./repositories/BLIP",
|
||||
"./repositories/CodeFormer",
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import latents
|
|||
import options
|
||||
|
||||
# console handler
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
from rich.pretty import install as pretty_install
|
||||
from rich.traceback import install as traceback_install
|
||||
from rich.console import Console
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 50e74e11e32212437cb1b88846f63e92dcb4a92d
|
||||
Subproject commit 49f3ca2275760752661c0fc3c65e19eb6eef2a49
|
||||
|
|
@ -7,7 +7,7 @@ from modules import cmd_args
|
|||
from modules.paths_internal import script_path
|
||||
|
||||
try:
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ dir_repos = "repositories"
|
|||
|
||||
|
||||
def commit_hash():
|
||||
global stored_commit_hash
|
||||
global stored_commit_hash # pylint: disable=global-statement
|
||||
if stored_commit_hash is not None:
|
||||
return stored_commit_hash
|
||||
try:
|
||||
|
|
@ -85,7 +85,7 @@ def run_extension_installer(ext_dir):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup.run_setup(False)
|
||||
setup.run_setup()
|
||||
setup.set_environment()
|
||||
setup.check_torch()
|
||||
setup.log.info(f"Server arguments: {sys.argv[1:]}")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import sys
|
|||
import anyio
|
||||
import starlette
|
||||
import gradio
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
from rich.console import Console
|
||||
from rich.theme import Theme
|
||||
from rich.pretty import install as pretty_install
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from types import MethodType
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
import torch
|
||||
from torch.nn.functional import silu
|
||||
import ldm.modules.attention
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import re
|
|||
import io
|
||||
from os import mkdir
|
||||
from urllib import request
|
||||
from rich import print, progress # pylint: disable=W0622
|
||||
from rich import print, progress # pylint: disable=redefined-builtin
|
||||
import torch
|
||||
import safetensors.torch
|
||||
from omegaconf import OmegaConf
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import os
|
|||
import collections
|
||||
import glob
|
||||
from copy import deepcopy
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
from modules import paths, shared, devices, script_callbacks, sd_models
|
||||
|
||||
vae_ignore_keys = {"model_ema.decay", "model_ema.num_updates"}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
import os
|
||||
import sys
|
||||
import inspect
|
||||
from collections import namedtuple
|
||||
|
||||
import torch
|
||||
import tqdm
|
||||
import html
|
||||
import datetime
|
||||
import csv
|
||||
import safetensors.torch
|
||||
|
||||
|
|
@ -20,7 +17,7 @@ from modules.textual_inversion.learn_schedule import LearnRateScheduler
|
|||
|
||||
from modules.textual_inversion.image_embedding import embedding_to_b64, embedding_from_b64, insert_image_data_embed, extract_image_data_embed, caption_image_overlay
|
||||
from modules.textual_inversion.logging import save_settings_to_file
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
|
||||
TextualInversionTemplate = namedtuple("TextualInversionTemplate", ["name", "path"])
|
||||
textual_inversion_templates = {}
|
||||
|
|
@ -234,7 +231,7 @@ class EmbeddingDatabase:
|
|||
displayed_embeddings = (tuple(self.word_embeddings.keys()), tuple(self.skipped_embeddings.keys()))
|
||||
if self.previously_displayed_embeddings != displayed_embeddings:
|
||||
self.previously_displayed_embeddings = displayed_embeddings
|
||||
print(f"Textual inversion embeddings loaded({len(self.word_embeddings)}): {', '.join(self.word_embeddings.keys())}")
|
||||
print(f"Embeddings loaded: {', '.join(self.word_embeddings.keys())} ({len(self.word_embeddings)})")
|
||||
if len(self.skipped_embeddings) > 0:
|
||||
print(f"Textual inversion embeddings skipped({len(self.skipped_embeddings)}): {', '.join(self.skipped_embeddings.keys())}")
|
||||
|
||||
|
|
@ -317,16 +314,14 @@ def tensorboard_add(tensorboard_writer, loss, global_step, step, learn_rate, epo
|
|||
tensorboard_add_scaler(tensorboard_writer, f"Learn rate/train/epoch-{epoch_num}", learn_rate, step)
|
||||
|
||||
def tensorboard_add_scaler(tensorboard_writer, tag, value, step):
|
||||
tensorboard_writer.add_scalar(tag=tag,
|
||||
scalar_value=value, global_step=step)
|
||||
tensorboard_writer.add_scalar(tag=tag, scalar_value=value, global_step=step)
|
||||
|
||||
def tensorboard_add_image(tensorboard_writer, tag, pil_image, step):
|
||||
# Convert a pil image to a torch tensor
|
||||
img_tensor = torch.as_tensor(np.array(pil_image, copy=True))
|
||||
img_tensor = img_tensor.view(pil_image.size[1], pil_image.size[0],
|
||||
len(pil_image.getbands()))
|
||||
img_tensor = img_tensor.view(pil_image.size[1], pil_image.size[0], len(pil_image.getbands()))
|
||||
img_tensor = img_tensor.permute((2, 0, 1))
|
||||
|
||||
|
||||
tensorboard_writer.add_image(tag, img_tensor, global_step=step)
|
||||
|
||||
def validate_train_inputs(model_name, learn_rate, batch_size, gradient_step, data_root, template_file, template_filename, steps, save_model_every, create_image_every, log_directory, name="embedding"):
|
||||
|
|
@ -396,7 +391,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st
|
|||
if initial_step >= steps:
|
||||
shared.state.textinfo = "Model has already been trained beyond specified max steps"
|
||||
return embedding, filename
|
||||
|
||||
|
||||
scheduler = LearnRateScheduler(learn_rate, steps, initial_step)
|
||||
clip_grad = torch.nn.utils.clip_grad_value_ if clip_grad_mode == "value" else \
|
||||
torch.nn.utils.clip_grad_norm_ if clip_grad_mode == "norm" else \
|
||||
|
|
@ -406,7 +401,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st
|
|||
# dataset loading may take a while, so input validations and early returns should be done before this
|
||||
shared.state.textinfo = f"Preparing dataset from {html.escape(data_root)}..."
|
||||
old_parallel_processing_allowed = shared.parallel_processing_allowed
|
||||
|
||||
|
||||
if shared.opts.training_enable_tensorboard:
|
||||
tensorboard_writer = tensorboard_setup(log_directory)
|
||||
|
||||
|
|
@ -433,7 +428,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st
|
|||
optimizer_saved_dict = torch.load(filename + '.optim', map_location='cpu')
|
||||
if embedding.checksum() == optimizer_saved_dict.get('hash', None):
|
||||
optimizer_state_dict = optimizer_saved_dict.get('optimizer_state_dict', None)
|
||||
|
||||
|
||||
if optimizer_state_dict is not None:
|
||||
optimizer.load_state_dict(optimizer_state_dict)
|
||||
print("Loaded existing optimizer from checkpoint")
|
||||
|
|
@ -479,7 +474,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st
|
|||
|
||||
if clip_grad:
|
||||
clip_grad_sched.step(embedding.step)
|
||||
|
||||
|
||||
with devices.autocast():
|
||||
x = batch.latent_sample.to(devices.device, non_blocking=pin_memory)
|
||||
if use_weight:
|
||||
|
|
@ -507,7 +502,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st
|
|||
# go back until we reach gradient accumulation steps
|
||||
if (j + 1) % gradient_step != 0:
|
||||
continue
|
||||
|
||||
|
||||
if clip_grad:
|
||||
clip_grad(embedding.vec, clip_grad_sched.learn_rate)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import html
|
|||
import git
|
||||
import gradio as gr
|
||||
|
||||
from rich import print
|
||||
from rich import print # pylint: disable=redefined-builtin
|
||||
from modules import extensions, shared, paths, errors
|
||||
from modules.call_queue import wrap_gradio_gpu_call
|
||||
|
||||
|
|
|
|||
150
setup.py
150
setup.py
|
|
@ -15,7 +15,7 @@ class Dot(dict): # dot notation access to dictionary attributes
|
|||
|
||||
|
||||
log = logging.getLogger("sd")
|
||||
args = Dot({ 'debug': False, 'quick': False, 'upgrade': False, 'noupdate': False, 'skip-extensions': False })
|
||||
args = Dot({ 'debug': False, 'upgrade': False, 'noupdate': False, 'skip-extensions': False, 'skip-requirements': False })
|
||||
|
||||
|
||||
# setup console and file logging
|
||||
|
|
@ -77,14 +77,14 @@ def installed(package):
|
|||
|
||||
# install package using pip if not already installed
|
||||
def install(package):
|
||||
def pip(args: str):
|
||||
log.debug(f"Running pip: {args}")
|
||||
result = subprocess.run(f'"{sys.executable}" -m pip {args}', shell=True, check=False, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
def pip(arg: str):
|
||||
log.debug(f"Running pip: {arg}")
|
||||
result = subprocess.run(f'"{sys.executable}" -m pip {arg}', shell=True, check=False, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
txt = result.stdout.decode(encoding="utf8", errors="ignore")
|
||||
if len(result.stderr) > 0:
|
||||
txt = txt + '\n' + result.stderr.decode(encoding="utf8", errors="ignore")
|
||||
if result.returncode != 0:
|
||||
log.error(f'Error running pip with args: {args}')
|
||||
log.error(f'Error running pip with args: {arg}')
|
||||
log.debug(f'Pip output: {txt}')
|
||||
return txt
|
||||
|
||||
|
|
@ -93,48 +93,45 @@ def install(package):
|
|||
|
||||
|
||||
# execute git command
|
||||
def git(args: str):
|
||||
# log.debug(f"Running git: {args}")
|
||||
def git(arg: str):
|
||||
git_cmd = os.environ.get('GIT', "git")
|
||||
result = subprocess.run(f'"{git_cmd}" {args}', check=False, shell=True, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
result = subprocess.run(f'"{git_cmd}" {arg}', check=False, shell=True, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
txt = result.stdout.decode(encoding="utf8", errors="ignore")
|
||||
if len(result.stderr) > 0:
|
||||
txt = txt + '\n' + result.stderr.decode(encoding="utf8", errors="ignore")
|
||||
if result.returncode != 0:
|
||||
log.error(f'Error running git with args: {args}')
|
||||
log.error(f'Error running git with args: {arg}')
|
||||
log.debug(f'Git output: {txt}')
|
||||
return txt
|
||||
|
||||
|
||||
# update switch to main branch as head can get detached and update repository
|
||||
def update(dir):
|
||||
branch = git(f'-C "{dir}" branch')
|
||||
def update(folder):
|
||||
branch = git(f'-C "{folder}" branch')
|
||||
if 'main' in branch:
|
||||
# log.debug(f'Using main branch {dir}')
|
||||
git(f'-C "{dir}" checkout main')
|
||||
git(f'-C "{folder}" checkout main')
|
||||
elif 'master' in branch:
|
||||
# log.debug(f'Using master branch {dir}')
|
||||
git(f'-C "{dir}" checkout master')
|
||||
git(f'-C "{folder}" checkout master')
|
||||
else:
|
||||
log.warning(f'Unknown branch for: {dir}')
|
||||
git(f'-C "{dir}" pull --rebase --autostash')
|
||||
branch = git(f'-C "{dir}" branch')
|
||||
log.warning(f'Unknown branch for: {folder}')
|
||||
git(f'-C "{folder}" pull --rebase --autostash')
|
||||
branch = git(f'-C "{folder}" branch')
|
||||
|
||||
|
||||
# clone git repository
|
||||
def clone(url, dir, commithash=None):
|
||||
if os.path.exists(dir):
|
||||
def clone(url, folder, commithash=None):
|
||||
if os.path.exists(folder):
|
||||
if commithash is None:
|
||||
return
|
||||
current_hash = git(f'-C "{dir}" rev-parse HEAD').strip()
|
||||
current_hash = git(f'-C "{folder}" rev-parse HEAD').strip()
|
||||
if current_hash != commithash:
|
||||
git(f'-C "{dir}" fetch')
|
||||
git(f'-C "{dir}" checkout {commithash}')
|
||||
git(f'-C "{folder}" fetch')
|
||||
git(f'-C "{folder}" checkout {commithash}')
|
||||
return
|
||||
else:
|
||||
git(f'clone "{url}" "{dir}"')
|
||||
git(f'clone "{url}" "{folder}"')
|
||||
if commithash is not None:
|
||||
git(f'-C "{dir}" checkout {commithash}')
|
||||
git(f'-C "{folder}" checkout {commithash}')
|
||||
|
||||
|
||||
# check python version
|
||||
|
|
@ -159,6 +156,8 @@ def check_torch():
|
|||
log.warning("Torch repoorts CUDA not available")
|
||||
if '--no-half' not in sys.argv:
|
||||
sys.argv.append('--no-half')
|
||||
if '--no-half-vae' not in sys.argv:
|
||||
sys.argv.append('--no-half-vae')
|
||||
else:
|
||||
if torch.version.cuda:
|
||||
log.info(f'Torch backend: nVidia CUDA {torch.version.cuda} cuDNN {torch.backends.cudnn.version()}')
|
||||
|
|
@ -190,31 +189,31 @@ def install_packages():
|
|||
|
||||
# clone required repositories
|
||||
def install_repositories():
|
||||
def dir(name):
|
||||
def d(name):
|
||||
return os.path.join(os.path.dirname(__file__), 'repositories', name)
|
||||
|
||||
log.info('Installing repositories')
|
||||
os.makedirs(os.path.join(os.path.dirname(__file__), 'repositories'), exist_ok=True)
|
||||
stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/Stability-AI/stablediffusion.git")
|
||||
stable_diffusion_commit = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf")
|
||||
clone(stable_diffusion_repo, dir('stable-diffusion-stability-ai'), stable_diffusion_commit)
|
||||
clone(stable_diffusion_repo, d('stable-diffusion-stability-ai'), stable_diffusion_commit)
|
||||
taming_transformers_repo = os.environ.get('TAMING_TRANSFORMERS_REPO', "https://github.com/CompVis/taming-transformers.git")
|
||||
taming_transformers_commit = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', "3ba01b241669f5ade541ce990f7650a3b8f65318")
|
||||
clone(taming_transformers_repo, dir('taming-transformers'), taming_transformers_commit)
|
||||
clone(taming_transformers_repo, d('taming-transformers'), taming_transformers_commit)
|
||||
k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://github.com/crowsonkb/k-diffusion.git')
|
||||
k_diffusion_commit = os.environ.get('K_DIFFUSION_COMMIT_HASH', "b43db16749d51055f813255eea2fdf1def801919")
|
||||
clone(k_diffusion_repo, dir('k-diffusion'), k_diffusion_commit)
|
||||
clone(k_diffusion_repo, d('k-diffusion'), k_diffusion_commit)
|
||||
codeformer_repo = os.environ.get('CODEFORMER_REPO', 'https://github.com/sczhou/CodeFormer.git')
|
||||
codeformer_commit = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af")
|
||||
clone(codeformer_repo, dir('CodeFormer'), codeformer_commit)
|
||||
clone(codeformer_repo, d('CodeFormer'), codeformer_commit)
|
||||
blip_repo = os.environ.get('BLIP_REPO', 'https://github.com/salesforce/BLIP.git')
|
||||
blip_commit = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9")
|
||||
clone(blip_repo, dir('BLIP'), blip_commit)
|
||||
clone(blip_repo, d('BLIP'), blip_commit)
|
||||
|
||||
|
||||
# run extension installer
|
||||
def run_extension_installer(extension_dir):
|
||||
path_installer = os.path.join(extension_dir, "install.py")
|
||||
def run_extension_installer(folder):
|
||||
path_installer = os.path.join(folder, "install.py")
|
||||
if not os.path.isfile(path_installer):
|
||||
return
|
||||
try:
|
||||
|
|
@ -231,41 +230,31 @@ def run_extension_installer(extension_dir):
|
|||
except Exception as e:
|
||||
log.error(f'Exception running extension installer: {e}')
|
||||
|
||||
|
||||
# run installer for each installed and enabled extension and optionally update them
|
||||
def install_extensions():
|
||||
settings = {}
|
||||
# get list of all enabled extensions
|
||||
def list_extensions(folder):
|
||||
if os.path.isfile('config.json'):
|
||||
with open('config.json', "r", encoding="utf8") as file:
|
||||
settings = json.load(file)
|
||||
if settings.get('disable_all_extensions', 'none') != 'none':
|
||||
log.debug('Disabled extensions: all')
|
||||
return []
|
||||
disabled_extensions = set(settings.get('disabled_extensions', []))
|
||||
if len(disabled_extensions) > 0:
|
||||
log.debug(f'Disabled extensions: {disabled_extensions}')
|
||||
return [x for x in os.listdir(folder) if x not in disabled_extensions and not x.startswith('.')]
|
||||
|
||||
def list_extensions(folder):
|
||||
if settings.get('disable_all_extensions', 'none') != 'none':
|
||||
log.debug('Disabled extensions: all')
|
||||
return []
|
||||
disabled_extensions = set(settings.get('disabled_extensions', []))
|
||||
if len(disabled_extensions) > 0:
|
||||
log.debug(f'Disabled extensions: {disabled_extensions}')
|
||||
return [x for x in os.listdir(folder) if x not in disabled_extensions and not x.startswith('.')]
|
||||
|
||||
extensions_builtin_dir = os.path.join(os.path.dirname(__file__), 'extensions-builtin')
|
||||
extensions = list_extensions(extensions_builtin_dir)
|
||||
log.info(f'Extensions disabled: {settings.get("disabled_extensions", [])}')
|
||||
log.info(f'Extensions built-in: {extensions}')
|
||||
for ext in extensions:
|
||||
if not args.noupdate:
|
||||
update(os.path.join(extensions_builtin_dir, ext))
|
||||
if not args.skip_extensions:
|
||||
run_extension_installer(os.path.join(extensions_builtin_dir, ext))
|
||||
|
||||
extensions_dir = os.path.join(os.path.dirname(__file__), 'extensions')
|
||||
extensions = list_extensions(extensions_dir)
|
||||
log.info(f'Extensions enabled: {extensions}')
|
||||
for ext in extensions:
|
||||
if not args.noupdate:
|
||||
update(os.path.join(extensions_dir, ext))
|
||||
if not args.skip_extensions:
|
||||
run_extension_installer(os.path.join(extensions_dir, ext))
|
||||
# run installer for each installed and enabled extension and optionally update them
|
||||
def install_extensions():
|
||||
for folder in ['extensions-builtin', 'extensions']:
|
||||
extensions_dir = os.path.join(os.path.dirname(__file__), folder)
|
||||
extensions = list_extensions(extensions_dir)
|
||||
log.info(f'Extensions enabled: {extensions}')
|
||||
for ext in extensions:
|
||||
if not args.noupdate:
|
||||
update(os.path.join(extensions_dir, ext))
|
||||
if not args.skip_extensions:
|
||||
run_extension_installer(os.path.join(extensions_dir, ext))
|
||||
|
||||
|
||||
# initialize and optionally update submodules
|
||||
|
|
@ -309,6 +298,22 @@ def set_environment():
|
|||
os.environ.setdefault('NUMEXPR_MAX_THREADS', '16')
|
||||
|
||||
|
||||
def check_extensions():
|
||||
newest_all = 0
|
||||
for folder in ['extensions-builtin', 'extensions']:
|
||||
extensions_dir = os.path.join(os.path.dirname(__file__), folder)
|
||||
extensions = list_extensions(extensions_dir)
|
||||
for ext in extensions:
|
||||
newest = 0
|
||||
extension_dir = os.path.join(extensions_dir, ext)
|
||||
for f in os.listdir(extension_dir):
|
||||
ts = os.path.getmtime(os.path.join(extension_dir, f))
|
||||
newest = max(newest, ts)
|
||||
newest_all = max(newest_all, newest)
|
||||
log.debug(f'Extension version: {time.ctime(newest)} {folder}{os.pathsep}{ext}')
|
||||
return newest_all
|
||||
|
||||
|
||||
# check version of the main repo and optionally upgrade it
|
||||
def check_version():
|
||||
ver = git('log -1 --pretty=format:"%h %ad"')
|
||||
|
|
@ -336,6 +341,7 @@ def check_version():
|
|||
except Exception as e:
|
||||
log.error(f'Failed to check version: {e} {commits}')
|
||||
|
||||
|
||||
# check if we can run setup in quick mode
|
||||
def check_timestamp():
|
||||
if not os.path.isfile('setup.log'):
|
||||
|
|
@ -344,7 +350,12 @@ def check_timestamp():
|
|||
log.debug(f'Previous setup time: {time.ctime(setup_time)}')
|
||||
version_time = int(git('log -1 --pretty=format:"%at"'))
|
||||
log.debug(f'Repository update time: {time.ctime(int(version_time))}')
|
||||
return setup_time >= version_time
|
||||
if setup_time < version_time:
|
||||
return False
|
||||
extension_time = check_extensions()
|
||||
if setup_time < extension_time:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
@ -353,21 +364,20 @@ def parse_args():
|
|||
if vars(parser)['_option_string_actions'].get('--debug', None) is not None:
|
||||
return
|
||||
parser.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s")
|
||||
parser.add_argument('--quick', default = False, action='store_true', help = "Skip installing if setup.log is newer than repo timestamp, default: %(default)s")
|
||||
parser.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s")
|
||||
parser.add_argument('--noupdate', default = False, action='store_true', help = "Skip update extensions and submodules, default: %(default)s")
|
||||
parser.add_argument('--noupdate', default = False, action='store_true', help = "Skip update of extensions and submodules, default: %(default)s")
|
||||
parser.add_argument('--skip-requirements', default = False, action='store_true', help = "Skips checking and installing requirements, default: %(default)s")
|
||||
parser.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s")
|
||||
global args
|
||||
global args # pylint: disable=global-statement
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
# entry method when used as module
|
||||
def run_setup(quick = False):
|
||||
def run_setup():
|
||||
setup_logging()
|
||||
check_python()
|
||||
if (quick or args.quick) and check_timestamp():
|
||||
log.info('Attempting quick setup')
|
||||
if check_timestamp() and not args.upgrade:
|
||||
log.info('No changes detected: quick launch active')
|
||||
return
|
||||
log.info("Running setup")
|
||||
log.debug(f"Args: {vars(args)}")
|
||||
|
|
|
|||
280
ui-config.json
280
ui-config.json
|
|
@ -1209,5 +1209,283 @@
|
|||
"customscript/additional_networks.py/img2img/TEnc Weight 5/value": 1.0,
|
||||
"customscript/additional_networks.py/img2img/TEnc Weight 5/minimum": -1.0,
|
||||
"customscript/additional_networks.py/img2img/TEnc Weight 5/maximum": 2.0,
|
||||
"customscript/additional_networks.py/img2img/TEnc Weight 5/step": 0.05
|
||||
"customscript/additional_networks.py/img2img/TEnc Weight 5/step": 0.05,
|
||||
"customscript/tilediffusion.py/txt2img/Enable/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Overwrite image size/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Overwrite image size/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Keep input image size/value": true,
|
||||
"customscript/tilediffusion.py/txt2img/Image width/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Image width/value": 1024,
|
||||
"customscript/tilediffusion.py/txt2img/Image width/minimum": 256,
|
||||
"customscript/tilediffusion.py/txt2img/Image width/maximum": 16384,
|
||||
"customscript/tilediffusion.py/txt2img/Image width/step": 16,
|
||||
"customscript/tilediffusion.py/txt2img/Image height/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Image height/value": 1024,
|
||||
"customscript/tilediffusion.py/txt2img/Image height/minimum": 256,
|
||||
"customscript/tilediffusion.py/txt2img/Image height/maximum": 16384,
|
||||
"customscript/tilediffusion.py/txt2img/Image height/step": 16,
|
||||
"customscript/tilediffusion.py/txt2img/Method/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Method/value": "MultiDiffusion",
|
||||
"customscript/tilediffusion.py/txt2img/Move ControlNet images to CPU (if applicable)/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Move ControlNet images to CPU (if applicable)/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile width/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile width/value": 96,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile width/minimum": 16,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile width/maximum": 256,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile width/step": 16,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile height/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile height/value": 96,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile height/minimum": 16,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile height/maximum": 256,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile height/step": 16,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile overlap/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile overlap/value": 48,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile overlap/minimum": 0,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile overlap/maximum": 256,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile overlap/step": 4,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile batch size/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile batch size/value": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile batch size/minimum": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile batch size/maximum": 8,
|
||||
"customscript/tilediffusion.py/txt2img/Latent tile batch size/step": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Upscaler/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Upscaler/value": "None",
|
||||
"customscript/tilediffusion.py/txt2img/Scale Factor/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Scale Factor/value": 2.0,
|
||||
"customscript/tilediffusion.py/txt2img/Scale Factor/minimum": 1.0,
|
||||
"customscript/tilediffusion.py/txt2img/Scale Factor/maximum": 8.0,
|
||||
"customscript/tilediffusion.py/txt2img/Scale Factor/step": 0.05,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Noise Inversion/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Noise Inversion/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Inversion steps/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Inversion steps/value": 10,
|
||||
"customscript/tilediffusion.py/txt2img/Inversion steps/minimum": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Inversion steps/maximum": 100,
|
||||
"customscript/tilediffusion.py/txt2img/Inversion steps/step": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Retouch/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Retouch/value": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Retouch/minimum": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Retouch/maximum": 100,
|
||||
"customscript/tilediffusion.py/txt2img/Retouch/step": 0.1,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise strength/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise strength/value": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise strength/minimum": 0,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise strength/maximum": 2,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise strength/step": 0.01,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise kernel size/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise kernel size/value": 64,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise kernel size/minimum": 2,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise kernel size/maximum": 512,
|
||||
"customscript/tilediffusion.py/txt2img/Renoise kernel size/step": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Control/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Control/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Draw full canvas background/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Draw full canvas background/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Causalize layers/value": false,
|
||||
"txt2img/Custom Config File/visible": true,
|
||||
"txt2img/Custom Config File/value": "config.json",
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 1/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 1/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Type/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Type/value": "Background",
|
||||
"customscript/tilediffusion.py/txt2img/Feather/value": 0.2,
|
||||
"customscript/tilediffusion.py/txt2img/Feather/minimum": 0,
|
||||
"customscript/tilediffusion.py/txt2img/Feather/maximum": 1,
|
||||
"customscript/tilediffusion.py/txt2img/Feather/step": 0.05,
|
||||
"customscript/tilediffusion.py/txt2img/x/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/x/value": 0.4,
|
||||
"customscript/tilediffusion.py/txt2img/x/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/txt2img/x/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/txt2img/x/step": 0.01,
|
||||
"customscript/tilediffusion.py/txt2img/y/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/y/value": 0.4,
|
||||
"customscript/tilediffusion.py/txt2img/y/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/txt2img/y/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/txt2img/y/step": 0.01,
|
||||
"customscript/tilediffusion.py/txt2img/w/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/w/value": 0.2,
|
||||
"customscript/tilediffusion.py/txt2img/w/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/txt2img/w/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/txt2img/w/step": 0.01,
|
||||
"customscript/tilediffusion.py/txt2img/h/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/h/value": 0.2,
|
||||
"customscript/tilediffusion.py/txt2img/h/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/txt2img/h/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/txt2img/h/step": 0.01,
|
||||
"customscript/tilediffusion.py/txt2img/Seed/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Seed/value": -1.0,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 2/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 2/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 3/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 3/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 4/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 4/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 5/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 5/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 6/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 6/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 7/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 7/value": false,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 8/visible": true,
|
||||
"customscript/tilediffusion.py/txt2img/Enable Region 8/value": false,
|
||||
"customscript/vae_optimize.py/txt2img/Enable/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Enable/value": false,
|
||||
"customscript/vae_optimize.py/txt2img/Move VAE to GPU/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Move VAE to GPU/value": false,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Tile Size/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Tile Size/value": 2048,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Tile Size/minimum": 256,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Tile Size/maximum": 4096,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Tile Size/step": 16,
|
||||
"customscript/vae_optimize.py/txt2img/Decoder Tile Size/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Decoder Tile Size/value": 128,
|
||||
"customscript/vae_optimize.py/txt2img/Decoder Tile Size/minimum": 48,
|
||||
"customscript/vae_optimize.py/txt2img/Decoder Tile Size/maximum": 512,
|
||||
"customscript/vae_optimize.py/txt2img/Decoder Tile Size/step": 16,
|
||||
"customscript/vae_optimize.py/txt2img/Fast Encoder/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Fast Encoder/value": true,
|
||||
"customscript/vae_optimize.py/txt2img/Fast Decoder/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Fast Decoder/value": true,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Color Fix/visible": true,
|
||||
"customscript/vae_optimize.py/txt2img/Encoder Color Fix/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Overwrite image size/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Keep input image size/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Keep input image size/value": true,
|
||||
"customscript/tilediffusion.py/img2img/Image width/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Image width/value": 1024,
|
||||
"customscript/tilediffusion.py/img2img/Image width/minimum": 256,
|
||||
"customscript/tilediffusion.py/img2img/Image width/maximum": 16384,
|
||||
"customscript/tilediffusion.py/img2img/Image width/step": 16,
|
||||
"customscript/tilediffusion.py/img2img/Image height/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Image height/value": 1024,
|
||||
"customscript/tilediffusion.py/img2img/Image height/minimum": 256,
|
||||
"customscript/tilediffusion.py/img2img/Image height/maximum": 16384,
|
||||
"customscript/tilediffusion.py/img2img/Image height/step": 16,
|
||||
"customscript/tilediffusion.py/img2img/Method/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Method/value": "MultiDiffusion",
|
||||
"customscript/tilediffusion.py/img2img/Move ControlNet images to CPU (if applicable)/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Move ControlNet images to CPU (if applicable)/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile width/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile width/value": 96,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile width/minimum": 16,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile width/maximum": 256,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile width/step": 16,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile height/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile height/value": 96,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile height/minimum": 16,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile height/maximum": 256,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile height/step": 16,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile overlap/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile overlap/value": 48,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile overlap/minimum": 0,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile overlap/maximum": 256,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile overlap/step": 4,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile batch size/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile batch size/value": 1,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile batch size/minimum": 1,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile batch size/maximum": 8,
|
||||
"customscript/tilediffusion.py/img2img/Latent tile batch size/step": 1,
|
||||
"customscript/tilediffusion.py/img2img/Upscaler/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Upscaler/value": "None",
|
||||
"customscript/tilediffusion.py/img2img/Scale Factor/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Scale Factor/value": 2.0,
|
||||
"customscript/tilediffusion.py/img2img/Scale Factor/minimum": 1.0,
|
||||
"customscript/tilediffusion.py/img2img/Scale Factor/maximum": 8.0,
|
||||
"customscript/tilediffusion.py/img2img/Scale Factor/step": 0.05,
|
||||
"customscript/tilediffusion.py/img2img/Enable Noise Inversion/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Noise Inversion/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Inversion steps/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Inversion steps/value": 10,
|
||||
"customscript/tilediffusion.py/img2img/Inversion steps/minimum": 1,
|
||||
"customscript/tilediffusion.py/img2img/Inversion steps/maximum": 100,
|
||||
"customscript/tilediffusion.py/img2img/Inversion steps/step": 1,
|
||||
"customscript/tilediffusion.py/img2img/Retouch/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Retouch/value": 1,
|
||||
"customscript/tilediffusion.py/img2img/Retouch/minimum": 1,
|
||||
"customscript/tilediffusion.py/img2img/Retouch/maximum": 100,
|
||||
"customscript/tilediffusion.py/img2img/Retouch/step": 0.1,
|
||||
"customscript/tilediffusion.py/img2img/Renoise strength/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Renoise strength/value": 1,
|
||||
"customscript/tilediffusion.py/img2img/Renoise strength/minimum": 0,
|
||||
"customscript/tilediffusion.py/img2img/Renoise strength/maximum": 2,
|
||||
"customscript/tilediffusion.py/img2img/Renoise strength/step": 0.01,
|
||||
"customscript/tilediffusion.py/img2img/Renoise kernel size/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Renoise kernel size/value": 64,
|
||||
"customscript/tilediffusion.py/img2img/Renoise kernel size/minimum": 2,
|
||||
"customscript/tilediffusion.py/img2img/Renoise kernel size/maximum": 512,
|
||||
"customscript/tilediffusion.py/img2img/Renoise kernel size/step": 1,
|
||||
"customscript/tilediffusion.py/img2img/Enable Control/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Control/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Draw full canvas background/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Draw full canvas background/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Causalize layers/value": false,
|
||||
"img2img/Custom Config File/visible": true,
|
||||
"img2img/Custom Config File/value": "config.json",
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 1/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 1/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Type/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Type/value": "Background",
|
||||
"customscript/tilediffusion.py/img2img/Feather/value": 0.2,
|
||||
"customscript/tilediffusion.py/img2img/Feather/minimum": 0,
|
||||
"customscript/tilediffusion.py/img2img/Feather/maximum": 1,
|
||||
"customscript/tilediffusion.py/img2img/Feather/step": 0.05,
|
||||
"customscript/tilediffusion.py/img2img/x/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/x/value": 0.4,
|
||||
"customscript/tilediffusion.py/img2img/x/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/img2img/x/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/img2img/x/step": 0.01,
|
||||
"customscript/tilediffusion.py/img2img/y/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/y/value": 0.4,
|
||||
"customscript/tilediffusion.py/img2img/y/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/img2img/y/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/img2img/y/step": 0.01,
|
||||
"customscript/tilediffusion.py/img2img/w/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/w/value": 0.2,
|
||||
"customscript/tilediffusion.py/img2img/w/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/img2img/w/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/img2img/w/step": 0.01,
|
||||
"customscript/tilediffusion.py/img2img/h/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/h/value": 0.2,
|
||||
"customscript/tilediffusion.py/img2img/h/minimum": 0.0,
|
||||
"customscript/tilediffusion.py/img2img/h/maximum": 1.0,
|
||||
"customscript/tilediffusion.py/img2img/h/step": 0.01,
|
||||
"customscript/tilediffusion.py/img2img/Seed/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Seed/value": -1.0,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 2/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 2/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 3/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 3/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 4/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 4/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 5/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 5/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 6/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 6/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 7/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 7/value": false,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 8/visible": true,
|
||||
"customscript/tilediffusion.py/img2img/Enable Region 8/value": false,
|
||||
"customscript/vae_optimize.py/img2img/Enable/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Enable/value": false,
|
||||
"customscript/vae_optimize.py/img2img/Move VAE to GPU/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Move VAE to GPU/value": false,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Tile Size/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Tile Size/value": 2048,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Tile Size/minimum": 256,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Tile Size/maximum": 4096,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Tile Size/step": 16,
|
||||
"customscript/vae_optimize.py/img2img/Decoder Tile Size/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Decoder Tile Size/value": 128,
|
||||
"customscript/vae_optimize.py/img2img/Decoder Tile Size/minimum": 48,
|
||||
"customscript/vae_optimize.py/img2img/Decoder Tile Size/maximum": 512,
|
||||
"customscript/vae_optimize.py/img2img/Decoder Tile Size/step": 16,
|
||||
"customscript/vae_optimize.py/img2img/Fast Encoder/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Fast Encoder/value": true,
|
||||
"customscript/vae_optimize.py/img2img/Fast Decoder/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Fast Decoder/value": true,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Color Fix/visible": true,
|
||||
"customscript/vae_optimize.py/img2img/Encoder Color Fix/value": false
|
||||
}
|
||||
19
webui.py
19
webui.py
|
|
@ -12,21 +12,22 @@ from modules import timer, errors
|
|||
errors.install()
|
||||
startup_timer = timer.Timer()
|
||||
|
||||
import torch
|
||||
import torchvision
|
||||
import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them
|
||||
import torch # pylint: disable=C0411
|
||||
import torchvision # pylint: disable=W0611,C0411
|
||||
import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them # pylint: disable=W0611,C0411
|
||||
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
|
||||
warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="pytorch_lightning")
|
||||
warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvision")
|
||||
startup_timer.record("torch")
|
||||
|
||||
from modules import import_hook
|
||||
import gradio
|
||||
import ldm.modules.encoders.modules
|
||||
from modules import import_hook # pylint: disable=W0611,C0411,C0412
|
||||
import gradio # pylint: disable=W0611,C0411
|
||||
startup_timer.record("gradio")
|
||||
|
||||
from modules import extra_networks, ui_extra_networks_checkpoints
|
||||
import ldm.modules.encoders.modules # pylint: disable=W0611,C0411
|
||||
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 wrap_queued_call, queue_lock, wrap_gradio_gpu_call
|
||||
from modules.call_queue import wrap_queued_call, queue_lock, wrap_gradio_gpu_call # pylint: disable=W0611,C0411
|
||||
|
||||
# Truncate version number of nightly/local build of PyTorch to not cause exceptions with CodeFormer or Safetensors
|
||||
if ".dev" in torch.__version__ or "+git" in torch.__version__:
|
||||
|
|
@ -199,7 +200,7 @@ def webui():
|
|||
# shared.demo.app is instance of ASGIApp
|
||||
|
||||
cmd_opts.autolaunch = False
|
||||
startup_timer.record("gradio")
|
||||
startup_timer.record("start")
|
||||
|
||||
app.user_middleware = [x for x in app.user_middleware if x.cls.__name__ != 'CORSMiddleware']
|
||||
setup_middleware(app)
|
||||
|
|
|
|||
Loading…
Reference in New Issue