aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--artists.csv2
-rw-r--r--modules/paths.py19
-rw-r--r--modules/sd_models.py5
-rw-r--r--modules/sd_samplers.py1
-rw-r--r--scripts/xy_grid.py7
6 files changed, 20 insertions, 16 deletions
diff --git a/README.md b/README.md
index 50e222ee..da49930d 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,8 @@ A browser interface based on Gradio library for Stable Diffusion.
![](txt2img_Screenshot.png)
+Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts) wiki page for extra scripts developed by users.
+
## Features
[Detailed feature showcase with images](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features):
- Original txt2img and img2img modes
diff --git a/artists.csv b/artists.csv
index c92d08f5..14ba2022 100644
--- a/artists.csv
+++ b/artists.csv
@@ -359,7 +359,6 @@ Antanas Sutkus,0.7369492,black-white
Leonora Carrington,0.73726475,scribbles
Hieronymus Bosch,0.7369955,scribbles
A. J. Casson,0.73666203,scribbles
-A.J.Casson,0.73666203,scribbles
Chaim Soutine,0.73662066,scribbles
Artur Bordalo,0.7364549,weird
Thomas Allom,0.68792284,fineart
@@ -1907,7 +1906,6 @@ Alex Schomburg,0.46614102,digipa-low-impact
Bastien L. Deharme,0.583349,special
František Jakub Prokyš,0.58782333,fineart
Jesper Ejsing,0.58782053,fineart
-Jesper Ejsing,0.58782053,fineart
Odd Nerdrum,0.53551745,digipa-high-impact
Tom Lovell,0.5877577,fineart
Ayami Kojima,0.5877416,fineart
diff --git a/modules/paths.py b/modules/paths.py
index 0f9f6a56..ceb80417 100644
--- a/modules/paths.py
+++ b/modules/paths.py
@@ -16,21 +16,24 @@ for possible_sd_path in possible_sd_paths:
assert sd_path is not None, "Couldn't find Stable Diffusion in any of: " + str(possible_sd_paths)
path_dirs = [
- (sd_path, 'ldm', 'Stable Diffusion'),
- (os.path.join(sd_path, '../taming-transformers'), 'taming', 'Taming Transformers'),
- (os.path.join(sd_path, '../CodeFormer'), 'inference_codeformer.py', 'CodeFormer'),
- (os.path.join(sd_path, '../BLIP'), 'models/blip.py', 'BLIP'),
- (os.path.join(sd_path, '../latent-diffusion'), 'LDSR.py', 'LDSR'),
- (os.path.join(sd_path, '../k-diffusion'), 'k_diffusion/sampling.py', 'k_diffusion'),
+ (sd_path, 'ldm', 'Stable Diffusion', []),
+ (os.path.join(sd_path, '../taming-transformers'), 'taming', 'Taming Transformers', []),
+ (os.path.join(sd_path, '../CodeFormer'), 'inference_codeformer.py', 'CodeFormer', []),
+ (os.path.join(sd_path, '../BLIP'), 'models/blip.py', 'BLIP', []),
+ (os.path.join(sd_path, '../latent-diffusion'), 'LDSR.py', 'LDSR', []),
+ (os.path.join(sd_path, '../k-diffusion'), 'k_diffusion/sampling.py', 'k_diffusion', ["atstart"]),
]
paths = {}
-for d, must_exist, what in path_dirs:
+for d, must_exist, what, options in path_dirs:
must_exist_path = os.path.abspath(os.path.join(script_path, d, must_exist))
if not os.path.exists(must_exist_path):
print(f"Warning: {what} not found at path {must_exist_path}", file=sys.stderr)
else:
d = os.path.abspath(d)
- sys.path.append(d)
+ if "atstart" in options:
+ sys.path.insert(0, d)
+ else:
+ sys.path.append(d)
paths[what] = d
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 7ed22c1e..3f3f6b7c 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -99,6 +99,11 @@ def list_models():
title = modeltitle(filename, h)
checkpoints_list[title] = CheckpointInfo(filename, title, h, model_name)
+def get_closet_checkpoint_match(searchString):
+ applicable = sorted([info for info in checkpoints_list.values() if searchString in info.title], key = lambda x:len(x.title))
+ if len(applicable)>0:
+ return applicable[0]
+ return None
def model_hash(filename):
try:
diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py
index 5642b870..dff89c09 100644
--- a/modules/sd_samplers.py
+++ b/modules/sd_samplers.py
@@ -4,7 +4,6 @@ import torch
import tqdm
from PIL import Image
import inspect
-
import k_diffusion.sampling
import ldm.models.diffusion.ddim
import ldm.models.diffusion.plms
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py
index f8bc64c4..146663b0 100644
--- a/scripts/xy_grid.py
+++ b/scripts/xy_grid.py
@@ -45,11 +45,8 @@ def apply_sampler(p, x, xs):
def apply_checkpoint(p, x, xs):
- applicable = [info for info in modules.sd_models.checkpoints_list.values() if x in info.title]
- assert len(applicable) > 0, f'Checkpoint {x} for found'
-
- info = applicable[0]
-
+ info = modules.sd_models.get_closet_checkpoint_match(x)
+ assert info is not None, f'Checkpoint for {x} not found'
modules.sd_models.reload_model_weights(shared.sd_model, info)