Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
S
Stable Diffusion Webui
管理
动态
成员
代码
仓库
分支
提交
标签
仓库图
比较修订版本
部署
模型注册表
分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
Hunter0726
Stable Diffusion Webui
提交
522a8b9f
提交
522a8b9f
编辑于
1 year ago
作者:
Aarni Koskela
浏览文件
操作
下载
补丁
差异文件
Add a status logger in modules.shared
上级
e4303443
No related branches found
No related tags found
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
modules/shared.py
+9
-0
9 个添加, 0 个删除
modules/shared.py
有
9 个添加
和
0 个删除
modules/shared.py
+
9
−
0
浏览文件 @
522a8b9f
...
...
@@ -4,6 +4,7 @@ import os
import
sys
import
threading
import
time
import
logging
import
gradio
as
gr
import
torch
...
...
@@ -18,6 +19,8 @@ from modules.paths_internal import models_path, script_path, data_path, sd_confi
from
ldm.models.diffusion.ddpm
import
LatentDiffusion
from
typing
import
Optional
log
=
logging
.
getLogger
(
__name__
)
demo
=
None
parser
=
cmd_args
.
parser
...
...
@@ -144,12 +147,15 @@ class State:
def
request_restart
(
self
)
->
None
:
self
.
interrupt
()
self
.
server_command
=
"
restart
"
log
.
info
(
"
Received restart request
"
)
def
skip
(
self
):
self
.
skipped
=
True
log
.
info
(
"
Received skip request
"
)
def
interrupt
(
self
):
self
.
interrupted
=
True
log
.
info
(
"
Received interrupt request
"
)
def
nextjob
(
self
):
if
opts
.
live_previews_enable
and
opts
.
show_progress_every_n_steps
==
-
1
:
...
...
@@ -189,8 +195,11 @@ class State:
self
.
time_start
=
time
.
time
()
self
.
job
=
job
devices
.
torch_gc
()
log
.
info
(
"
Starting job %s
"
,
job
)
def
end
(
self
):
duration
=
time
.
time
()
-
self
.
time_start
log
.
info
(
"
Ending job %s (%.2f seconds)
"
,
self
.
job
,
duration
)
self
.
job
=
""
self
.
job_count
=
0
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录