Fix save error

This commit is contained in:
Greg Fuller 2022-10-11 19:46:33 -07:00 committed by AUTOMATIC1111
parent 94c01aa356
commit aeacbac218

View File

@ -148,7 +148,10 @@ def save_files(js_data, images, do_make_zip, index):
is_grid = image_index < p.index_of_first_image
i = 0 if is_grid else (image_index - p.index_of_first_image)
fullfn, txt_fullfn = save_image(image, path, "", seed=p.all_seeds[i], prompt=p.all_prompts[i], extension=extension, info=p.infotexts[image_index], grid=is_grid, p=p, save_to_dirs=save_to_dirs)
seed = p.all_seeds[i] if len(p.all_seeds) > 1 else p.seed
prompt = p.all_prompts[i] if len(p.all_prompts) > 1 else p.prompt
info = p.infotexts[image_index] if len(p.infotexts) > 1 else p.infotexts[0]
fullfn, txt_fullfn = save_image(image, path, "", seed=seed, prompt=prompt, extension=extension, info=info, grid=is_grid, p=p, save_to_dirs=save_to_dirs)
filename = os.path.relpath(fullfn, path)
filenames.append(filename)