add number of itter

This commit is contained in:
Artem Zagidulin 2022-11-02 21:30:50 +03:00
parent a9e979977a
commit de64146ad2
2 changed files with 4 additions and 4 deletions

View File

@ -510,7 +510,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
break
if p.scripts is not None:
p.scripts.process_one(p)
p.scripts.process_one(p, n)
with devices.autocast():
uc = prompt_parser.get_learned_conditioning(shared.sd_model, len(prompts) * [p.negative_prompt], p.steps)

View File

@ -70,7 +70,7 @@ class Script:
pass
def process_one(self, p, *args):
def process_one(self, p, n, *args):
"""
Same as process(), but called for every iteration
"""
@ -301,11 +301,11 @@ class ScriptRunner:
print(f"Error running process: {script.filename}", file=sys.stderr)
print(traceback.format_exc(), file=sys.stderr)
def process_one(self, p):
def process_one(self, p, n):
for script in self.alwayson_scripts:
try:
script_args = p.script_args[script.args_from:script.args_to]
script.process_one(p, *script_args)
script.process_one(p, n, *script_args)
except Exception:
print(f"Error running process_one: {script.filename}", file=sys.stderr)
print(traceback.format_exc(), file=sys.stderr)