aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authord8ahazard <d8ahazard@gmail.com>2022-09-29 22:46:23 +0000
committerd8ahazard <d8ahazard@gmail.com>2022-09-29 22:46:23 +0000
commit0dce0df1ee63b2f158805c1a1f1a3743cc4a104b (patch)
treedfcec33656d06835e71961b117b63e510cb9bff2 /modules/sd_models.py
parent31ad536c331df14dd785bfd2a1f93f91a8f7839e (diff)
downloadstable-diffusion-webui-gfx803-0dce0df1ee63b2f158805c1a1f1a3743cc4a104b.tar.gz
stable-diffusion-webui-gfx803-0dce0df1ee63b2f158805c1a1f1a3743cc4a104b.tar.bz2
stable-diffusion-webui-gfx803-0dce0df1ee63b2f158805c1a1f1a3743cc4a104b.zip
Holy $hit.
Yep. Fix gfpgan_model_arch requirement(s). Add Upscaler base class, move from images. Add a lot of methods to Upscaler. Re-work all the child upscalers to be proper classes. Add BSRGAN scaler. Add ldsr_model_arch class, removing the dependency for another repo that just uses regular latent-diffusion stuff. Add one universal method that will always find and load new upscaler models without having to add new "setup_model" calls. Still need to add command line params, but that could probably be automated. Add a "self.scale" property to all Upscalers so the scalers themselves can do "things" in response to the requested upscaling size. Ensure LDSR doesn't get stuck in a longer loop of "upscale/downscale/upscale" as we try to reach the target upscale size. Add typehints for IDE sanity. PEP-8 improvements. Moar.
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 89b7d276..23826727 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -50,7 +50,7 @@ def setup_model(dirname):
if not os.path.exists(model_path):
os.makedirs(model_path)
checkpoints_list.clear()
- model_list = modelloader.load_models(model_path, model_url, dirname, model_name, ext_filter=".ckpt")
+ model_list = modelloader.load_models(model_path=model_path, model_url=model_url, command_path=dirname, download_name=model_name, ext_filter=".ckpt")
cmd_ckpt = shared.cmd_opts.ckpt
if os.path.exists(cmd_ckpt):
@@ -68,6 +68,7 @@ def setup_model(dirname):
def model_hash(filename):
try:
+ print(f"Opening: {filename}")
with open(filename, "rb") as file:
import hashlib
m = hashlib.sha256()