MCPcopy Index your code
hub / github.com/vladmandic/sdnext / before_process

Method before_process

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

Source from the content-addressed store, hash-verified

642 return processed
643
644 def before_process(self, p: StableDiffusionProcessing, **kwargs):
645 s = ScriptSummary('before-process')
646 for script in self.alwayson_scripts:
647 try:
648 if hasattr(script, 'args_to') and hasattr(script, 'args_from') and (script.args_to > 0) and (script.args_to >= script.args_from):
649 args = p.per_script_args.get(script.title(), p.script_args[script.args_from:script.args_to])
650 script.before_process(p, *args, **kwargs)
651 except Exception as e:
652 errors.display(e, f"Error running before process: {script.filename}")
653 s.record(script.title())
654 s.report()
655
656 def process(self, p: StableDiffusionProcessing, **kwargs):
657 s = ScriptSummary('process')

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected