diff options
author | Francesco Manzali <manzali.francesco97@gmail.com> | 2023-02-01 20:16:52 +0000 |
---|---|---|
committer | Francesco Manzali <manzali.francesco97@gmail.com> | 2023-02-01 20:16:52 +0000 |
commit | 5afd9e82c3829348c58803cd85b02c87308fffae (patch) | |
tree | fcb5ce2a716d662da674b9bd9a1153f540b8ede7 /scripts/prompt_matrix.py | |
parent | 17b24e45e8839d889af35ee0b2fb0825306ddafe (diff) | |
download | stable-diffusion-webui-gfx803-5afd9e82c3829348c58803cd85b02c87308fffae.tar.gz stable-diffusion-webui-gfx803-5afd9e82c3829348c58803cd85b02c87308fffae.tar.bz2 stable-diffusion-webui-gfx803-5afd9e82c3829348c58803cd85b02c87308fffae.zip |
Use the real images size, not the process
- Use the width/height of the first image in processed.images
- No more need for rounding in prompt_matrix
Diffstat (limited to 'scripts/prompt_matrix.py')
-rw-r--r-- | scripts/prompt_matrix.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/prompt_matrix.py b/scripts/prompt_matrix.py index f6575b6b..50c7f3cb 100644 --- a/scripts/prompt_matrix.py +++ b/scripts/prompt_matrix.py @@ -78,8 +78,8 @@ class Script(scripts.Script): p.prompt_for_display = original_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, max(p.width, p.hr_upscale_to_x), max(p.height, p.hr_upscale_to_y), prompt_matrix_parts)
+ 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)
processed.images.insert(0, grid)
processed.index_of_first_image = 1
processed.infotexts.insert(0, processed.infotexts[0])
|