Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
522a8b9f
Commit
522a8b9f
authored
Jun 30, 2023
by
Aarni Koskela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a status logger in modules.shared
parent
e4303443
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
modules/shared.py
modules/shared.py
+9
-0
No files found.
modules/shared.py
View file @
522a8b9f
...
@@ -4,6 +4,7 @@ import os
...
@@ -4,6 +4,7 @@ import os
import
sys
import
sys
import
threading
import
threading
import
time
import
time
import
logging
import
gradio
as
gr
import
gradio
as
gr
import
torch
import
torch
...
@@ -18,6 +19,8 @@ from modules.paths_internal import models_path, script_path, data_path, sd_confi
...
@@ -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
ldm.models.diffusion.ddpm
import
LatentDiffusion
from
typing
import
Optional
from
typing
import
Optional
log
=
logging
.
getLogger
(
__name__
)
demo
=
None
demo
=
None
parser
=
cmd_args
.
parser
parser
=
cmd_args
.
parser
...
@@ -144,12 +147,15 @@ class State:
...
@@ -144,12 +147,15 @@ class State:
def
request_restart
(
self
)
->
None
:
def
request_restart
(
self
)
->
None
:
self
.
interrupt
()
self
.
interrupt
()
self
.
server_command
=
"restart"
self
.
server_command
=
"restart"
log
.
info
(
"Received restart request"
)
def
skip
(
self
):
def
skip
(
self
):
self
.
skipped
=
True
self
.
skipped
=
True
log
.
info
(
"Received skip request"
)
def
interrupt
(
self
):
def
interrupt
(
self
):
self
.
interrupted
=
True
self
.
interrupted
=
True
log
.
info
(
"Received interrupt request"
)
def
nextjob
(
self
):
def
nextjob
(
self
):
if
opts
.
live_previews_enable
and
opts
.
show_progress_every_n_steps
==
-
1
:
if
opts
.
live_previews_enable
and
opts
.
show_progress_every_n_steps
==
-
1
:
...
@@ -189,8 +195,11 @@ class State:
...
@@ -189,8 +195,11 @@ class State:
self
.
time_start
=
time
.
time
()
self
.
time_start
=
time
.
time
()
self
.
job
=
job
self
.
job
=
job
devices
.
torch_gc
()
devices
.
torch_gc
()
log
.
info
(
"Starting job
%
s"
,
job
)
def
end
(
self
):
def
end
(
self
):
duration
=
time
.
time
()
-
self
.
time_start
log
.
info
(
"Ending job
%
s (
%.2
f seconds)"
,
self
.
job
,
duration
)
self
.
job
=
""
self
.
job
=
""
self
.
job_count
=
0
self
.
job_count
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment