This commit is contained in:
lllyasviel
2024-01-27 16:44:10 -08:00
parent 7676915cd0
commit 1ed5e695fc
3 changed files with 11 additions and 3 deletions

View File

@@ -225,6 +225,8 @@ class StableDiffusionProcessing:
is_api: bool = field(default=False, init=False)
extra_result_images = []
def __post_init__(self):
if self.sampler_index is not None:
print("sampler_index argument for StableDiffusionProcessing does not do anything; use sampler_name", file=sys.stderr)
@@ -514,8 +516,9 @@ class StableDiffusionProcessing:
class Processed:
def __init__(self, p: StableDiffusionProcessing, images_list, seed=-1, info="", subseed=None, all_prompts=None, all_negative_prompts=None, all_seeds=None, all_subseeds=None, index_of_first_image=0, infotexts=None, comments=""):
def __init__(self, p: StableDiffusionProcessing, images_list, extra_images_list, seed=-1, info="", subseed=None, all_prompts=None, all_negative_prompts=None, all_seeds=None, all_subseeds=None, index_of_first_image=0, infotexts=None, comments=""):
self.images = images_list
self.extra_images = extra_images_list
self.prompt = p.prompt
self.negative_prompt = p.negative_prompt
self.seed = seed
@@ -864,7 +867,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
# strength, which is saved as "Model Strength: 1.0" in the infotext
if n == 0:
with open(os.path.join(paths.data_path, "params.txt"), "w", encoding="utf8") as file:
processed = Processed(p, [])
processed = Processed(p, [], [])
file.write(processed.infotext(p, 0))
p.setup_conds()
@@ -1057,6 +1060,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
res = Processed(
p,
images_list=output_images,
extra_images_list=p.extra_result_images,
seed=p.all_seeds[0],
info=infotexts[0],
subseed=p.all_subseeds[0],