change StableDiffusionProcessing to internally use sampler name instead of sampler index

This commit is contained in:
AUTOMATIC
2022-11-19 12:01:51 +03:00
parent d9fd4525a5
commit cdc8020d13
11 changed files with 49 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
import modules.scripts
from modules import sd_samplers
from modules.processing import StableDiffusionProcessing, Processed, StableDiffusionProcessingTxt2Img, \
StableDiffusionProcessingImg2Img, process_images
from modules.shared import opts, cmd_opts
@@ -21,7 +22,7 @@ def txt2img(prompt: str, negative_prompt: str, prompt_style: str, prompt_style2:
seed_resize_from_h=seed_resize_from_h,
seed_resize_from_w=seed_resize_from_w,
seed_enable_extras=seed_enable_extras,
sampler_index=sampler_index,
sampler_name=sd_samplers.samplers[sampler_index].name,
batch_size=batch_size,
n_iter=n_iter,
steps=steps,