aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/custom_code.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-14 08:46:27 +0000
committerGitHub <noreply@github.com>2023-05-14 08:46:27 +0000
commit80adb6979d46bbb832254004cac4f4f9bec9efb3 (patch)
treee206ee60f9be21e9e20d483213b7d0a610d2bdbd /scripts/custom_code.py
parent1dcd6723242c3d691610f9ed937951baea49c2d1 (diff)
parent3ddc76342298ad0b2d14cb571ceb48c0b0c4176d (diff)
downloadstable-diffusion-webui-gfx803-80adb6979d46bbb832254004cac4f4f9bec9efb3.tar.gz
stable-diffusion-webui-gfx803-80adb6979d46bbb832254004cac4f4f9bec9efb3.tar.bz2
stable-diffusion-webui-gfx803-80adb6979d46bbb832254004cac4f4f9bec9efb3.zip
Merge branch 'dev' into find_vae
Diffstat (limited to 'scripts/custom_code.py')
-rw-r--r--scripts/custom_code.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/custom_code.py b/scripts/custom_code.py
index 4071d86d..cc6f0d49 100644
--- a/scripts/custom_code.py
+++ b/scripts/custom_code.py
@@ -4,7 +4,7 @@ import ast
import copy
from modules.processing import Processed
-from modules.shared import opts, cmd_opts, state
+from modules.shared import cmd_opts
def convertExpr2Expression(expr):
@@ -77,7 +77,7 @@ return process_images(p)
module.display = display
indent = " " * indent_level
- indented = code.replace('\n', '\n' + indent)
+ indented = code.replace('\n', f"\n{indent}")
body = f"""def __webuitemp__():
{indent}{indented}
__webuitemp__()"""