aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/xy_grid.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-10-07 20:22:22 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-10-07 20:22:22 +0000
commit12c4d5c6b5bf9dd50d0601c36af4f99b65316d58 (patch)
tree30bbd10c806afd8168cbc0cd0f33529bde8d1f47 /scripts/xy_grid.py
parentf7c787eb7c295c27439f4fbdf78c26b8389560be (diff)
downloadstable-diffusion-webui-gfx803-12c4d5c6b5bf9dd50d0601c36af4f99b65316d58.tar.gz
stable-diffusion-webui-gfx803-12c4d5c6b5bf9dd50d0601c36af4f99b65316d58.tar.bz2
stable-diffusion-webui-gfx803-12c4d5c6b5bf9dd50d0601c36af4f99b65316d58.zip
hypernetwork training mk1
Diffstat (limited to 'scripts/xy_grid.py')
-rw-r--r--scripts/xy_grid.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py
index c0c364df..5b504de6 100644
--- a/scripts/xy_grid.py
+++ b/scripts/xy_grid.py
@@ -78,8 +78,7 @@ def apply_checkpoint(p, x, xs):
def apply_hypernetwork(p, x, xs):
- hn = shared.hypernetworks.get(x, None)
- opts.data["sd_hypernetwork"] = hn.name if hn is not None else 'None'
+ shared.hypernetwork = shared.hypernetworks.get(x, None)
def format_value_add_label(p, opt, x):
@@ -199,7 +198,7 @@ class Script(scripts.Script):
modules.processing.fix_seed(p)
p.batch_size = 1
- initial_hn = opts.sd_hypernetwork
+ initial_hn = shared.hypernetwork
def process_axis(opt, vals):
if opt.label == 'Nothing':
@@ -308,6 +307,6 @@ class Script(scripts.Script):
# restore checkpoint in case it was changed by axes
modules.sd_models.reload_model_weights(shared.sd_model)
- opts.data["sd_hypernetwork"] = initial_hn
+ shared.hypernetwork = initial_hn
return processed