Refactor code to iterate over cfg and seed in common_ksampler_xyz()

This commit is contained in:
Ayberk Aksoy
2024-01-01 15:01:18 -05:00
parent cec8c759be
commit f7c1f50bed
+4 -3
View File
@@ -171,14 +171,15 @@ def common_ksampler_xyz(
if alphas is not None:
print(f'alpha = {alphas}')
for cfg_ in cfg:
for seed_ in seed:
noise, latent_image = get_noise([seed_], latent_image, disable_noise, latent.get('batch_index', 0))
noise, latent_image, cfg_ = get_cfg(noise, latent_image, cfg)
noise, latent_image, cfg__ = get_cfg(noise, latent_image, [cfg_])
cfg_ = cfg_.to('cuda')
cfg__ = cfg__.to('cuda')
samples = comfy.sample.sample(
current_model, noise, step, cfg_, sampler, scheduler,
current_model, noise, step, cfg__, sampler, scheduler,
positive_copy, negative_copy, latent_image[0],
denoise=denoise, disable_noise=disable_noise,
start_step=start_step, last_step=last_step,