diff options
author | Dement242 <113772485+Dement242@users.noreply.github.com> | 2022-09-17 21:18:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 21:18:56 +0000 |
commit | 3a050d19c6ce9c8cc838bd3c924eb43a34ca5309 (patch) | |
tree | c486fbd3d80cd7d449fed9e4ec0d35ad4894c14d /scripts/custom_code.py | |
parent | 33434fc6fc32987d56f8c402450c05b0a5a0164b (diff) | |
parent | 8ff6f093206111940e2601187f3f208d761543d6 (diff) | |
download | stable-diffusion-webui-gfx803-3a050d19c6ce9c8cc838bd3c924eb43a34ca5309.tar.gz stable-diffusion-webui-gfx803-3a050d19c6ce9c8cc838bd3c924eb43a34ca5309.tar.bz2 stable-diffusion-webui-gfx803-3a050d19c6ce9c8cc838bd3c924eb43a34ca5309.zip |
Merge branch 'AUTOMATIC1111:master' into Dement242-patch-1
Diffstat (limited to 'scripts/custom_code.py')
-rw-r--r-- | scripts/custom_code.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/custom_code.py b/scripts/custom_code.py index 5694f2dd..a9b10c09 100644 --- a/scripts/custom_code.py +++ b/scripts/custom_code.py @@ -4,8 +4,8 @@ import gradio as gr from modules.processing import Processed
from modules.shared import opts, cmd_opts, state
-
class Script(scripts.Script):
+
def title(self):
return "Custom code"
@@ -18,6 +18,7 @@ class Script(scripts.Script): return [code]
+
def run(self, p, code):
assert cmd_opts.allow_code, '--allow-code option must be enabled'
@@ -37,4 +38,5 @@ class Script(scripts.Script): exec(compiled, module.__dict__)
return Processed(p, *display_result_data)
-
+
+
\ No newline at end of file |