Commit 06ada734 authored by Billy Cao's avatar Billy Cao

Prevent warning on sampler_index if sampler_name is being used

parent 3cf93de2
...@@ -117,6 +117,8 @@ class Api: ...@@ -117,6 +117,8 @@ class Api:
"do_not_save_grid": True "do_not_save_grid": True
} }
) )
if populate.sampler_name:
populate.sampler_index = None # prevent a warning later on
p = StableDiffusionProcessingTxt2Img(**vars(populate)) p = StableDiffusionProcessingTxt2Img(**vars(populate))
# Override object param # Override object param
...@@ -148,6 +150,8 @@ class Api: ...@@ -148,6 +150,8 @@ class Api:
"mask": mask "mask": mask
} }
) )
if populate.sampler_name:
populate.sampler_index = None # prevent a warning later on
p = StableDiffusionProcessingImg2Img(**vars(populate)) p = StableDiffusionProcessingImg2Img(**vars(populate))
imgs = [] imgs = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment