save grids created by scripts

This commit is contained in:
AUTOMATIC 2022-09-04 03:38:24 +03:00
parent 7350c71259
commit b99a47b12d
2 changed files with 5 additions and 1 deletions

View File

@ -79,4 +79,7 @@ class Script(scripts.Script):
grid = images.draw_prompt_matrix(grid, p.width, p.height, prompt_matrix_parts) grid = images.draw_prompt_matrix(grid, p.width, p.height, prompt_matrix_parts)
processed.images.insert(0, grid) processed.images.insert(0, grid)
if opts.grid_save:
images.save_image(processed.images[0], p.outpath_grids, "prompt_matrix", prompt=original_prompt, seed=seed)
return processed return processed

View File

@ -150,6 +150,7 @@ class Script(scripts.Script):
cell=cell cell=cell
) )
images.save_image(processed.images[0], p.outpath_grids, "xy_grid", prompt=p.prompt, seed=processed.seed) if opts.grid_save:
images.save_image(processed.images[0], p.outpath_grids, "xy_grid", prompt=p.prompt, seed=processed.seed)
return processed return processed