Skip to content

Commit 45bf9a6

Browse files
committed
added clip skip to XY plot
1 parent a2d70f2 commit 45bf9a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/xy_grid.py

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ def apply_hypernetwork(p, x, xs):
8383
hypernetwork.load_hypernetwork(x)
8484

8585

86+
def apply_clip_skip(p, x, xs):
87+
opts.data["CLIP_ignore_last_layers"] = x
88+
89+
8690
def format_value_add_label(p, opt, x):
8791
if type(x) == float:
8892
x = round(x, 8)
@@ -134,6 +138,7 @@ def str_permutations(x):
134138
AxisOption("Sigma max", float, apply_field("s_tmax"), format_value_add_label),
135139
AxisOption("Sigma noise", float, apply_field("s_noise"), format_value_add_label),
136140
AxisOption("Eta", float, apply_field("eta"), format_value_add_label),
141+
AxisOption("Clip skip", int, apply_clip_skip, format_value_add_label),
137142
AxisOptionImg2Img("Denoising", float, apply_field("denoising_strength"), format_value_add_label), # as it is now all AxisOptionImg2Img items must go after AxisOption ones
138143
]
139144

@@ -201,6 +206,7 @@ def run(self, p, x_type, x_values, y_type, y_values, draw_legend, no_fixed_seeds
201206
modules.processing.fix_seed(p)
202207

203208
p.batch_size = 1
209+
CLIP_ignore_last_layers = opts.CLIP_ignore_last_layers
204210

205211
def process_axis(opt, vals):
206212
if opt.label == 'Nothing':
@@ -321,4 +327,6 @@ def cell(x, y):
321327

322328
hypernetwork.load_hypernetwork(opts.sd_hypernetwork)
323329

330+
opts.data["CLIP_ignore_last_layers"] = CLIP_ignore_last_layers
331+
324332
return processed

0 commit comments

Comments
 (0)