(self, p: StableDiffusionProcessing, processed: Processed, *args)
| 624 | return processed |
| 625 | |
| 626 | def after(self, p: StableDiffusionProcessing, processed: Processed, *args): |
| 627 | s = ScriptSummary('after') |
| 628 | script_index = args[0] if len(args) > 0 else 0 |
| 629 | if (script_index is None) or (script_index == 0): |
| 630 | return processed |
| 631 | script = self.selectable_scripts[script_index - 1] |
| 632 | if script is None or not hasattr(script, 'after'): |
| 633 | return processed |
| 634 | parsed = [] |
| 635 | if hasattr(script, 'args_to') and hasattr(script, 'args_from'): |
| 636 | parsed = p.per_script_args.get(script.title(), args[script.args_from:script.args_to]) |
| 637 | after_processed = script.after(p, processed, *parsed) |
| 638 | if after_processed is not None: |
| 639 | processed = after_processed |
| 640 | s.record(script.title()) |
| 641 | s.report() |
| 642 | return processed |
| 643 | |
| 644 | def before_process(self, p: StableDiffusionProcessing, **kwargs): |
| 645 | s = ScriptSummary('before-process') |
nothing calls this directly
no test coverage detected