aboutsummaryrefslogtreecommitdiffstats
path: root/modules/generation_parameters_copypaste.py
diff options
context:
space:
mode:
authorBeinsezii <39478211+Beinsezii@users.noreply.github.com>2023-06-27 22:29:47 +0000
committerGitHub <noreply@github.com>2023-06-27 22:29:47 +0000
commit9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38 (patch)
treed86d470db2289a31e589a7bd777a38784605313c /modules/generation_parameters_copypaste.py
parent1d7c51fb9f757b5dcdc506f8fc003e6047151567 (diff)
parentfab73f2e7d388ca99cdb3d5de7f36c0b9a1a3b1c (diff)
downloadstable-diffusion-webui-gfx803-9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38.tar.gz
stable-diffusion-webui-gfx803-9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38.tar.bz2
stable-diffusion-webui-gfx803-9d8af4bd6aaf09b8a94dc10dd5e99c82e23dec38.zip
Merge branch 'AUTOMATIC1111:dev' into dev
Diffstat (limited to 'modules/generation_parameters_copypaste.py')
-rw-r--r--modules/generation_parameters_copypaste.py30
1 files changed, 1 insertions, 29 deletions
diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py
index a638f912..a3448be9 100644
--- a/modules/generation_parameters_copypaste.py
+++ b/modules/generation_parameters_copypaste.py
@@ -174,31 +174,6 @@ def send_image_and_dimensions(x):
return img, w, h
-
-def find_hypernetwork_key(hypernet_name, hypernet_hash=None):
- """Determines the config parameter name to use for the hypernet based on the parameters in the infotext.
-
- Example: an infotext provides "Hypernet: ke-ta" and "Hypernet hash: 1234abcd". For the "Hypernet" config
- parameter this means there should be an entry that looks like "ke-ta-10000(1234abcd)" to set it to.
-
- If the infotext has no hash, then a hypernet with the same name will be selected instead.
- """
- hypernet_name = hypernet_name.lower()
- if hypernet_hash is not None:
- # Try to match the hash in the name
- for hypernet_key in shared.hypernetworks.keys():
- result = re_hypernet_hash.search(hypernet_key)
- if result is not None and result[1] == hypernet_hash:
- return hypernet_key
- else:
- # Fall back to a hypernet with the same name
- for hypernet_key in shared.hypernetworks.keys():
- if hypernet_key.lower().startswith(hypernet_name):
- return hypernet_key
-
- return None
-
-
def restore_old_hires_fix_params(res):
"""for infotexts that specify old First pass size parameter, convert it into
width, height, and hr scale"""
@@ -332,10 +307,6 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model
return res
-settings_map = {}
-
-
-
infotext_to_setting_name_mapping = [
('Clip skip', 'CLIP_stop_at_last_layers', ),
('Conditional mask weight', 'inpainting_mask_weight'),
@@ -357,6 +328,7 @@ infotext_to_setting_name_mapping = [
('Token merging ratio hr', 'token_merging_ratio_hr'),
('RNG', 'randn_source'),
('NGMS', 's_min_uncond'),
+ ('Pad conds', 'pad_cond_uncond'),
]