Add '--no-prompt-history' cmd args for disable last generation prompt history

This commit is contained in:
10sa
2024-03-09 11:33:45 +09:00
parent 02a4ceabdd
commit c50b7e4eff
3 changed files with 3 additions and 2 deletions

View File

@@ -904,7 +904,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
# infotext could be modified by that callback
# Example: a wildcard processed by process_batch sets an extra model
# strength, which is saved as "Model Strength: 1.0" in the infotext
if n == 0:
if n == 0 and not cmd_opts.no_prompt_history:
with open(os.path.join(paths.data_path, "params.txt"), "w", encoding="utf8") as file:
processed = Processed(p, [])
file.write(processed.infotext(p, 0))