aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-10-09 18:58:55 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-10-09 18:58:55 +0300
commit45bf9a6264b3507473e02cc3f9aa36559f24aca2 (patch)
tree19ee607caedeeef05062d282ac89fdf86a16bc72 /scripts
parenta2d70f25bf51264d8d68f4f36937b390f79334a7 (diff)
added clip skip to XY plot
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xy_grid.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/xy_grid.py b/scripts/xy_grid.py
index c89ca1a9..7b0d9083 100644
--- a/scripts/xy_grid.py
+++ b/scripts/xy_grid.py
@@ -83,6 +83,10 @@ def apply_hypernetwork(p, x, xs):
hypernetwork.load_hypernetwork(x)
+def apply_clip_skip(p, x, xs):
+ opts.data["CLIP_ignore_last_layers"] = x
+
+
def format_value_add_label(p, opt, x):
if type(x) == float:
x = round(x, 8)
@@ -134,6 +138,7 @@ axis_options = [
AxisOption("Sigma max", float, apply_field("s_tmax"), format_value_add_label),
AxisOption("Sigma noise", float, apply_field("s_noise"), format_value_add_label),
AxisOption("Eta", float, apply_field("eta"), format_value_add_label),
+ AxisOption("Clip skip", int, apply_clip_skip, format_value_add_label),
AxisOptionImg2Img("Denoising", float, apply_field("denoising_strength"), format_value_add_label), # as it is now all AxisOptionImg2Img items must go after AxisOption ones
]
@@ -201,6 +206,7 @@ class Script(scripts.Script):
modules.processing.fix_seed(p)
p.batch_size = 1
+ CLIP_ignore_last_layers = opts.CLIP_ignore_last_layers
def process_axis(opt, vals):
if opt.label == 'Nothing':
@@ -321,4 +327,6 @@ class Script(scripts.Script):
hypernetwork.load_hypernetwork(opts.sd_hypernetwork)
+ opts.data["CLIP_ignore_last_layers"] = CLIP_ignore_last_layers
+
return processed