diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-07 20:22:22 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-07 20:22:22 +0000 |
commit | 12c4d5c6b5bf9dd50d0601c36af4f99b65316d58 (patch) | |
tree | 30bbd10c806afd8168cbc0cd0f33529bde8d1f47 /scripts/xy_grid.py | |
parent | f7c787eb7c295c27439f4fbdf78c26b8389560be (diff) | |
download | stable-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.py | 7 |
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
|