| 654 | s.report() |
| 655 | |
| 656 | def process(self, p: StableDiffusionProcessing, **kwargs): |
| 657 | s = ScriptSummary('process') |
| 658 | for script in self.alwayson_scripts: |
| 659 | try: |
| 660 | if hasattr(script, 'args_to') and hasattr(script, 'args_from') and (script.args_to > 0) and (script.args_to >= script.args_from): |
| 661 | args = p.per_script_args.get(script.title(), p.script_args[script.args_from:script.args_to]) |
| 662 | script.process(p, *args, **kwargs) |
| 663 | except Exception as e: |
| 664 | errors.display(e, f'Running script process: {script.filename}') |
| 665 | s.record(script.title()) |
| 666 | s.report() |
| 667 | |
| 668 | def process_images(self, p: StableDiffusionProcessing, **kwargs): |
| 669 | s = ScriptSummary('process_images') |