Merge pull request #38 from AUTOMATIC1111/master

sync branches
This commit is contained in:
Vladimir Mandic
2023-02-26 10:35:20 -05:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -582,9 +582,9 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
ratio = image.width / image.height
if oversize and ratio > 1:
image = image.resize((opts.target_side_length, image.height * opts.target_side_length // image.width), LANCZOS)
image = image.resize((round(opts.target_side_length), round(image.height * opts.target_side_length / image.width)), LANCZOS)
elif oversize:
image = image.resize((image.width * opts.target_side_length // image.height, opts.target_side_length), LANCZOS)
image = image.resize((round(image.width * opts.target_side_length / image.height), round(opts.target_side_length)), LANCZOS)
try:
_atomically_save_image(image, fullfn_without_extension, ".jpg")
+3
View File
@@ -244,6 +244,9 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend
cell_mode = processed_image.mode
cell_size = processed_image.size
processed_result.images = [Image.new(cell_mode, cell_size)]
processed_result.all_prompts = [processed.prompt]
processed_result.all_seeds = [processed.seed]
processed_result.infotexts = [processed.infotexts[0]]
image_cache[index(ix, iy, iz)] = processed_image
if include_lone_images: