Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Overbill1683
Stable Diffusion Webui
提交
37a23011
S
Stable Diffusion Webui
项目概览
Overbill1683
/
Stable Diffusion Webui
10 个月 前同步成功
通知
1752
Star
81
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
S
Stable Diffusion Webui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
37a23011
编写于
1月 10, 2023
作者:
S
space-nuko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Expose the compiled class module of scripts to extensions
上级
9cfd10cd
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
3 addition
and
3 deletion
+3
-3
modules/scripts.py
modules/scripts.py
+3
-3
未找到文件。
modules/scripts.py
浏览文件 @
37a23011
...
@@ -152,7 +152,7 @@ def basedir():
...
@@ -152,7 +152,7 @@ def basedir():
scripts_data
=
[]
scripts_data
=
[]
ScriptFile
=
namedtuple
(
"ScriptFile"
,
[
"basedir"
,
"filename"
,
"path"
])
ScriptFile
=
namedtuple
(
"ScriptFile"
,
[
"basedir"
,
"filename"
,
"path"
])
ScriptClassData
=
namedtuple
(
"ScriptClassData"
,
[
"script_class"
,
"path"
,
"basedir"
])
ScriptClassData
=
namedtuple
(
"ScriptClassData"
,
[
"script_class"
,
"path"
,
"basedir"
,
"module"
])
def
list_scripts
(
scriptdirname
,
extension
):
def
list_scripts
(
scriptdirname
,
extension
):
...
@@ -206,7 +206,7 @@ def load_scripts():
...
@@ -206,7 +206,7 @@ def load_scripts():
for
key
,
script_class
in
module
.
__dict__
.
items
():
for
key
,
script_class
in
module
.
__dict__
.
items
():
if
type
(
script_class
)
==
type
and
issubclass
(
script_class
,
Script
):
if
type
(
script_class
)
==
type
and
issubclass
(
script_class
,
Script
):
scripts_data
.
append
(
ScriptClassData
(
script_class
,
scriptfile
.
path
,
scriptfile
.
basedir
))
scripts_data
.
append
(
ScriptClassData
(
script_class
,
scriptfile
.
path
,
scriptfile
.
basedir
,
module
))
except
Exception
:
except
Exception
:
print
(
f
"Error loading script:
{
scriptfile
.
filename
}
"
,
file
=
sys
.
stderr
)
print
(
f
"Error loading script:
{
scriptfile
.
filename
}
"
,
file
=
sys
.
stderr
)
...
@@ -241,7 +241,7 @@ class ScriptRunner:
...
@@ -241,7 +241,7 @@ class ScriptRunner:
self
.
alwayson_scripts
.
clear
()
self
.
alwayson_scripts
.
clear
()
self
.
selectable_scripts
.
clear
()
self
.
selectable_scripts
.
clear
()
for
script_class
,
path
,
basedir
in
scripts_data
:
for
script_class
,
path
,
basedir
,
script_module
in
scripts_data
:
script
=
script_class
()
script
=
script_class
()
script
.
filename
=
path
script
.
filename
=
path
script
.
is_txt2img
=
not
is_img2img
script
.
is_txt2img
=
not
is_img2img
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录