mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
correct indent
This commit is contained in:
parent
2deea86781
commit
e808096cf6
@ -163,7 +163,7 @@ class ScriptRunner:
|
||||
return processed
|
||||
|
||||
def reload_sources(self):
|
||||
for si,script in list(enumerate(self.scripts)):
|
||||
for si, script in list(enumerate(self.scripts)):
|
||||
with open(script.filename, "r", encoding="utf8") as file:
|
||||
args_from = script.args_from
|
||||
args_to = script.args_to
|
||||
@ -171,6 +171,7 @@ class ScriptRunner:
|
||||
text = file.read()
|
||||
|
||||
from types import ModuleType
|
||||
|
||||
compiled = compile(text, filename, 'exec')
|
||||
module = ModuleType(script.filename)
|
||||
exec(compiled, module.__dict__)
|
||||
@ -189,8 +190,9 @@ def reload_script_body_only():
|
||||
scripts_txt2img.reload_sources()
|
||||
scripts_img2img.reload_sources()
|
||||
|
||||
|
||||
def reload_scripts(basedir):
|
||||
global scripts_txt2img,scripts_img2img
|
||||
global scripts_txt2img, scripts_img2img
|
||||
|
||||
scripts_data.clear()
|
||||
load_scripts(basedir)
|
||||
|
@ -1242,4 +1242,3 @@ if 'gradio_routes_templates_response' not in globals():
|
||||
|
||||
gradio_routes_templates_response = gradio.routes.templates.TemplateResponse
|
||||
gradio.routes.templates.TemplateResponse = template_response
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user