From cdac6a29e8b13f7530652f9301c58b7df138270e Mon Sep 17 00:00:00 2001 From: Kahsolt Date: Thu, 30 Mar 2023 20:40:36 +0800 Subject: [PATCH] compatible fix for #19 --- scripts/prompt_travel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prompt_travel.py b/scripts/prompt_travel.py index 42fbb5b..ce8d001 100644 --- a/scripts/prompt_travel.py +++ b/scripts/prompt_travel.py @@ -214,7 +214,7 @@ def get_conds_with_caching(function, required_prompts, steps, cache): seeds = p.all_seeds[n * p.batch_size:(n + 1) * p.batch_size] subseeds = p.all_subseeds[n * p.batch_size:(n + 1) * p.batch_size] - if p.scripts is not None: + if p.scripts is not None and hasattr(p, 'before_process_batch'): p.scripts.before_process_batch(p, batch_number=n, prompts=prompts, seeds=seeds, subseeds=subseeds) if len(prompts) == 0: