aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/prompt_matrix.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-02-19 09:41:29 +0000
committerGitHub <noreply@github.com>2023-02-19 09:41:29 +0000
commitdfb3b8f398239876cdfc03657680e50c76a1fed8 (patch)
tree30b5b4e5a179e9d88e75ac0abdcf0090e1c74397 /scripts/prompt_matrix.py
parentedb10092de516dda5271130ed53628387780a859 (diff)
parent43137773227344dd79b56c227dbc9fb54ac7c337 (diff)
downloadstable-diffusion-webui-gfx803-dfb3b8f398239876cdfc03657680e50c76a1fed8.tar.gz
stable-diffusion-webui-gfx803-dfb3b8f398239876cdfc03657680e50c76a1fed8.tar.bz2
stable-diffusion-webui-gfx803-dfb3b8f398239876cdfc03657680e50c76a1fed8.zip
Merge branch 'master' into weighted-learning
Diffstat (limited to 'scripts/prompt_matrix.py')
-rw-r--r--scripts/prompt_matrix.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/prompt_matrix.py b/scripts/prompt_matrix.py
index 3ee3cbe4..b1c486d4 100644
--- a/scripts/prompt_matrix.py
+++ b/scripts/prompt_matrix.py
@@ -54,7 +54,7 @@ class Script(scripts.Script):
prompt_type = gr.Radio(["positive", "negative"], label="Select prompt", elem_id=self.elem_id("prompt_type"), value="positive")
variations_delimiter = gr.Radio(["comma", "space"], label="Select joining char", elem_id=self.elem_id("variations_delimiter"), value="comma")
with gr.Column():
- margin_size = gr.Slider(label="Grid margins (px)", min=0, max=500, value=0, step=2, elem_id=self.elem_id("margin_size"))
+ margin_size = gr.Slider(label="Grid margins (px)", minimum=0, maximum=500, value=0, step=2, elem_id=self.elem_id("margin_size"))
return [put_at_start, different_seeds, prompt_type, variations_delimiter, margin_size]
@@ -99,8 +99,8 @@ class Script(scripts.Script):
p.prompt_for_display = positive_prompt
processed = process_images(p)
- grid = images.image_grid(processed.images, p.batch_size, rows=1 << ((len(prompt_matrix_parts) - 1) // 2))
- grid = images.draw_prompt_matrix(grid, p.width, p.height, prompt_matrix_parts, margin_size)
+ grid = images.image_grid(processed.images, p.batch_size, rows=1 << ((len(prompt_matrix_parts) - 1) // 2))
+ grid = images.draw_prompt_matrix(grid, processed.images[0].width, processed.images[1].height, prompt_matrix_parts, margin_size)
processed.images.insert(0, grid)
processed.index_of_first_image = 1
processed.infotexts.insert(0, processed.infotexts[0])