aboutsummaryrefslogtreecommitdiff
path: root/scripts/custom_code.py
diff options
context:
space:
mode:
authorpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2023-05-11 22:40:17 -0500
committerpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2023-05-11 22:40:17 -0500
commit75b3692920e8dceb9031dd405b9226b55d286ce1 (patch)
treeb7bb9db2aca00e54525b82ed1d902eac273766b9 /scripts/custom_code.py
parentf0efc8c211fc2d2c2f8caf6e2f92501922d18c99 (diff)
parentabe32cefa39dee36d7f661d4e63c28ea8dd60c4f (diff)
Merge branch 'dev' of https://github.com/AUTOMATIC1111/stable-diffusion-webui into tomesd
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__()"""