mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-09 10:41:15 -08:00
prototype progress api
This commit is contained in:
parent
99d728b5b1
commit
fddb4883f4
2 changed files with 88 additions and 14 deletions
|
|
@ -146,6 +146,19 @@ class State:
|
|||
def get_job_timestamp(self):
|
||||
return datetime.datetime.now().strftime("%Y%m%d%H%M%S") # shouldn't this return job_timestamp?
|
||||
|
||||
def js(self):
|
||||
obj = {
|
||||
"skipped": self.skipped,
|
||||
"interrupted": self.skipped,
|
||||
"job": self.job,
|
||||
"job_count": self.job_count,
|
||||
"job_no": self.job_no,
|
||||
"sampling_step": self.sampling_step,
|
||||
"sampling_steps": self.sampling_steps,
|
||||
}
|
||||
|
||||
return json.dumps(obj)
|
||||
|
||||
|
||||
state = State()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue