mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 20:35:06 +08:00
format
This commit is contained in:
parent
c8d453e915
commit
d20eb11c9e
@ -175,18 +175,22 @@ def do_nothing(p, x, xs):
|
||||
def format_nothing(p, opt, x):
|
||||
return ""
|
||||
|
||||
|
||||
def format_remove_path(p, opt, x):
|
||||
return os.path.basename(x)
|
||||
|
||||
|
||||
def str_permutations(x):
|
||||
"""dummy function for specifying it in AxisOption's type when you want to get a list of permutations"""
|
||||
return x
|
||||
|
||||
|
||||
def list_to_csv_string(data_list):
|
||||
with StringIO() as o:
|
||||
csv.writer(o).writerow(data_list)
|
||||
return o.getvalue().strip()
|
||||
|
||||
|
||||
class AxisOption:
|
||||
def __init__(self, label, type, apply, format_value=format_value_add_label, confirm=None, cost=0.0, choices=None):
|
||||
self.label = label
|
||||
@ -203,6 +207,7 @@ class AxisOptionImg2Img(AxisOption):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.is_img2img = True
|
||||
|
||||
|
||||
class AxisOptionTxt2Img(AxisOption):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
@ -294,7 +299,6 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend
|
||||
cell_size = processed_result.images[0].size
|
||||
processed_result.images[idx] = Image.new(cell_mode, cell_size)
|
||||
|
||||
|
||||
if first_axes_processed == 'x':
|
||||
for ix, x in enumerate(xs):
|
||||
if second_axes_processed == 'y':
|
||||
|
Loading…
Reference in New Issue
Block a user