MCPcopy Create free account
hub / github.com/vladmandic/sdnext / before_process_batch

Method before_process_batch

modules/scripts_manager.py:684–694  ·  view source on GitHub ↗
(self, p: StableDiffusionProcessing, **kwargs)

Source from the content-addressed store, hash-verified

682 return processed
683
684 def before_process_batch(self, p: StableDiffusionProcessing, **kwargs):
685 s = ScriptSummary('before-process-batch')
686 for script in self.alwayson_scripts:
687 try:
688 if hasattr(script, 'args_to') and hasattr(script, 'args_from') and (script.args_to > 0) and (script.args_to >= script.args_from):
689 args = p.per_script_args.get(script.title(), p.script_args[script.args_from:script.args_to])
690 script.before_process_batch(p, *args, **kwargs)
691 except Exception as e:
692 errors.display(e, f'Running script before process batch: {script.filename}')
693 s.record(script.title())
694 s.report()
695
696 def process_batch(self, p: StableDiffusionProcessing, **kwargs):
697 s = ScriptSummary('process-batch')

Callers

nothing calls this directly

Calls 7

recordMethod · 0.95
reportMethod · 0.95
ScriptSummaryClass · 0.85
getMethod · 0.45
titleMethod · 0.45
before_process_batchMethod · 0.45
displayMethod · 0.45

Tested by

no test coverage detected