add before process callback

This commit is contained in:
Vladimir Mandic
2023-09-17 10:16:33 -04:00
parent e0c8d37d5e
commit 4887b0a631
2 changed files with 27 additions and 0 deletions
+2
View File
@@ -572,6 +572,8 @@ def print_profile(profile, msg: str):
def process_images(p: StableDiffusionProcessing) -> Processed:
if not hasattr(p.sd_model, 'sd_checkpoint_info'):
return None
if p.scripts is not None:
p.scripts.before_process(p)
stored_opts = {}
for k, v in p.override_settings.copy().items():
orig = shared.opts.data.get(k, None) or shared.opts.data_labels[k].default