Merge pull request #1067 from unnamedplugins/dev

Fix issue where loopback was using batch mode
This commit is contained in:
ZeroCool 2022-09-13 00:00:14 -07:00 committed by GitHub
commit ad72deb3c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1594,7 +1594,7 @@ def img2img(prompt: str = '', init_info: any = None, init_info_mask: any = None,
except: except:
print("Install scikit-image to perform color correction on loopback") print("Install scikit-image to perform color correction on loopback")
for i in range(1): for i in range(n_iter):
if do_color_correction and i == 0: if do_color_correction and i == 0:
correction_target = cv2.cvtColor(np.asarray(init_img.copy()), cv2.COLOR_RGB2LAB) correction_target = cv2.cvtColor(np.asarray(init_img.copy()), cv2.COLOR_RGB2LAB)
@ -1607,7 +1607,7 @@ def img2img(prompt: str = '', init_info: any = None, init_info_mask: any = None,
sampler_name=sampler_name, sampler_name=sampler_name,
save_grid=save_grid, save_grid=save_grid,
batch_size=1, batch_size=1,
n_iter=n_iter, n_iter=1,
steps=ddim_steps, steps=ddim_steps,
cfg_scale=cfg_scale, cfg_scale=cfg_scale,
width=width, width=width,