From e14cba07716c4376ccaf86aaecfbcf2b3edbc2e7 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 15 Apr 2023 12:25:59 -0400 Subject: [PATCH] add lycoris folder --- extensions-builtin/sd-extension-steps-animation | 2 +- modules/cmd_args.py | 3 +++ modules/devices.py | 8 ++++---- modules/shared.py | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions-builtin/sd-extension-steps-animation b/extensions-builtin/sd-extension-steps-animation index 0c7e93583..90663eb74 160000 --- a/extensions-builtin/sd-extension-steps-animation +++ b/extensions-builtin/sd-extension-steps-animation @@ -1 +1 @@ -Subproject commit 0c7e93583265eca6e766f81d1ce85ddb39f7636d +Subproject commit 90663eb7450c3487b693cf20e76ec4d7edd78cd5 diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 3a79f53d7..fd21a80cc 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -60,8 +60,11 @@ def compatibility_args(opts, args): parser.add_argument("--bsrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.bsrgan_models_path) parser.add_argument("--realesrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.realesrgan_models_path) parser.add_argument("--clip-models-path", type=str, help=argparse.SUPPRESS, default=opts.clip_models_path) + parser.add_argument("--disable-nan-check", default = True, action='store_true', help=argparse.SUPPRESS) parser.add_argument("--disable-extension-access", default = False, action='store_true', help=argparse.SUPPRESS) args = parser.parse_args() if vars(parser)['_option_string_actions'].get('--lora-dir', None) is not None: args.lora_dir = opts.lora_dir + if vars(parser)['_option_string_actions'].get('--lyco-dir', None) is not None: + args.lyco_dir = opts.lyco_dir return args diff --git a/modules/devices.py b/modules/devices.py index 236af56e1..2cd36ebab 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -86,12 +86,12 @@ dtype_unet = torch.float16 unet_needs_upcast = False -def cond_cast_unet(input): - return input.to(dtype_unet) if unet_needs_upcast else input +def cond_cast_unet(tensor): + return tensor.to(dtype_unet) if unet_needs_upcast else tensor -def cond_cast_float(input): - return input.float() if unet_needs_upcast else input +def cond_cast_float(tensor): + return tensor.float() if unet_needs_upcast else tensor def randn(seed, shape): diff --git a/modules/shared.py b/modules/shared.py index 6e52ff2e1..f1cefc1cb 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -257,6 +257,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), { "realesrgan_models_path": OptionInfo(os.path.join(paths.models_path, 'RealESRGAN'), "Path to directory with RealESRGAN model file(s)"), "clip_models_path": OptionInfo(os.path.join(paths.models_path, 'CLIP'), "Path to directory with CLIP model file(s)"), "lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Path to directory with Lora network(s)"), + "lyco-dir": OptionInfo(os.path.join(paths.models_path, 'LyCORIS'), "Path to directory with LyCORIS network(s)"), # "gfpgan_model": OptionInfo("", "GFPGAN model file name"), }))