From 836b6463744e1de1ec57390766c3da4e9f7ee88f Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sun, 4 Sep 2022 13:08:06 +0300 Subject: moved images to --- scripts/custom_code.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/custom_code.py') diff --git a/scripts/custom_code.py b/scripts/custom_code.py index b359050a..5694f2dd 100644 --- a/scripts/custom_code.py +++ b/scripts/custom_code.py @@ -9,7 +9,8 @@ class Script(scripts.Script): def title(self): return "Custom code" - def enabled(self): + + def show(self, is_img2img): return cmd_opts.allow_code def ui(self, is_img2img): @@ -18,8 +19,7 @@ class Script(scripts.Script): return [code] def run(self, p, code): - if not cmd_opts.allow_code: - return + assert cmd_opts.allow_code, '--allow-code option must be enabled' display_result_data = [[], -1, ""] -- cgit v1.2.3