Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
S
Stable Diffusion Webui
管理
动态
成员
代码
仓库
分支
提交
标签
仓库图
比较修订版本
部署
模型注册表
分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
Hunter0726
Stable Diffusion Webui
提交
abc4d3a6
未验证
提交
abc4d3a6
编辑于
2 years ago
作者:
SirFrags
提交者:
GitHub
2 years ago
浏览文件
操作
下载
补丁
差异文件
preview replace save params
上级
a0d07fb5
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
modules/ui_extra_networks.py
+9
-1
9 个添加, 1 个删除
modules/ui_extra_networks.py
有
9 个添加
和
1 个删除
modules/ui_extra_networks.py
+
9
−
1
浏览文件 @
abc4d3a6
...
...
@@ -2,8 +2,10 @@ import glob
import
os.path
import
urllib.parse
from
pathlib
import
Path
from
PIL
import
PngImagePlugin
from
modules
import
shared
from
modules.images
import
read_info_from_image
import
gradio
as
gr
import
json
import
html
...
...
@@ -290,6 +292,7 @@ def setup_ui(ui, gallery):
img_info
=
images
[
index
if
index
>=
0
else
0
]
image
=
image_from_url_text
(
img_info
)
geninfo
,
items
=
read_info_from_image
(
image
)
is_allowed
=
False
for
extra_page
in
ui
.
stored_extra_pages
:
...
...
@@ -299,7 +302,12 @@ def setup_ui(ui, gallery):
assert
is_allowed
,
f
'
writing to
{
filename
}
is not allowed
'
image
.
save
(
filename
)
if
geninfo
:
pnginfo_data
=
PngImagePlugin
.
PngInfo
()
pnginfo_data
.
add_text
(
'
parameters
'
,
geninfo
)
image
.
save
(
filename
,
pnginfo
=
pnginfo_data
)
else
:
image
.
save
(
filename
)
return
[
page
.
create_html
(
ui
.
tabname
)
for
page
in
ui
.
stored_extra_pages
]
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录