Prevent warning on sampler_index if sampler_name is being used

This commit is contained in:
Billy Cao 2022-11-27 21:19:47 +08:00
parent 3cf93de24f
commit 06ada734c7

View File

@ -117,6 +117,8 @@ class Api:
"do_not_save_grid": True
}
)
if populate.sampler_name:
populate.sampler_index = None # prevent a warning later on
p = StableDiffusionProcessingTxt2Img(**vars(populate))
# Override object param
@ -148,6 +150,8 @@ class Api:
"mask": mask
}
)
if populate.sampler_name:
populate.sampler_index = None # prevent a warning later on
p = StableDiffusionProcessingImg2Img(**vars(populate))
imgs = []