aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-04 10:08:06 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-04 10:08:06 +0000
commit836b6463744e1de1ec57390766c3da4e9f7ee88f (patch)
tree8fa08f087779c1ee74fe9ed176bba741d4776d4f /scripts
parentb99a47b12d98c7324ae174c2a3418d999161f1bd (diff)
downloadstable-diffusion-webui-gfx803-836b6463744e1de1ec57390766c3da4e9f7ee88f.tar.gz
stable-diffusion-webui-gfx803-836b6463744e1de1ec57390766c3da4e9f7ee88f.tar.bz2
stable-diffusion-webui-gfx803-836b6463744e1de1ec57390766c3da4e9f7ee88f.zip
moved images to
Diffstat (limited to 'scripts')
-rw-r--r--scripts/custom_code.py6
1 files changed, 3 insertions, 3 deletions
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, ""]