Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
S
Stable Diffusion Webui
管理
动态
成员
代码
仓库
分支
提交
标签
仓库图
比较修订版本
部署
模型注册表
分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
Show more breadcrumbs
Hunter0726
Stable Diffusion Webui
提交
00901bfb
提交
00901bfb
编辑于
1年前
作者:
w-e-w
浏览文件
操作
下载
补丁
差异文件
handle selectable script_index is None
上级
a70dfb64
分支
handle-selectable-script_index-is-None
分支 包含提交
No related tags found
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
modules/scripts.py
+3
-1
3 个添加, 1 个删除
modules/scripts.py
有
3 个添加
和
1 个删除
modules/scripts.py
+
3
−
1
浏览文件 @
00901bfb
...
...
@@ -696,6 +696,8 @@ class ScriptRunner:
self
.
setup_ui_for_section
(
None
,
self
.
selectable_scripts
)
def
select_script
(
script_index
):
if
script_index
is
None
:
script_index
=
0
selected_script
=
self
.
selectable_scripts
[
script_index
-
1
]
if
script_index
>
0
else
None
return
[
gr
.
update
(
visible
=
selected_script
==
s
)
for
s
in
self
.
selectable_scripts
]
...
...
@@ -739,7 +741,7 @@ class ScriptRunner:
def
run
(
self
,
p
,
*
args
):
script_index
=
args
[
0
]
if
script_index
==
0
:
if
script_index
==
0
or
script_index
is
None
:
return
None
script
=
self
.
selectable_scripts
[
script_index
-
1
]
...
...
This diff is collapsed.
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录