@@ -61,7 +61,7 @@ def __init__(self, app, queue_lock):
61
61
self .app .add_api_route ("/sdapi/v1/extra-single-image" , self .extras_single_image_api , methods = ["POST" ], response_model = ExtrasSingleImageResponse )
62
62
self .app .add_api_route ("/sdapi/v1/extra-batch-images" , self .extras_batch_images_api , methods = ["POST" ], response_model = ExtrasBatchImagesResponse )
63
63
self .app .add_api_route ("/sdapi/v1/png-info" , self .pnginfoapi , methods = ["POST" ], response_model = PNGInfoResponse )
64
- self .app .add_api_route ("/sdapi/v1/progress" , self .progressapi , methods = ["GET" ])
64
+ self .app .add_api_route ("/sdapi/v1/progress" , self .progressapi , methods = ["GET" ], response_model = ProgressResponse )
65
65
66
66
def text2imgapi (self , txt2imgreq : StableDiffusionTxt2ImgProcessingAPI ):
67
67
sampler_index = sampler_to_index (txt2imgreq .sampler_index )
@@ -171,7 +171,7 @@ def progressapi(self):
171
171
# copy from check_progress_call of ui.py
172
172
173
173
if shared .state .job_count == 0 :
174
- return ProgressResponse (progress = 0 , eta_relative = 0 , state = shared .state .js ())
174
+ return ProgressResponse (progress = 0 , eta_relative = 0 , state = shared .state .dict ())
175
175
176
176
# avoid dividing zero
177
177
progress = 0.01
@@ -187,7 +187,7 @@ def progressapi(self):
187
187
188
188
progress = min (progress , 1 )
189
189
190
- return ProgressResponse (progress = progress , eta_relative = eta_relative , state = shared .state .js ())
190
+ return ProgressResponse (progress = progress , eta_relative = eta_relative , state = shared .state .dict ())
191
191
192
192
def launch (self , server_name , port ):
193
193
self .app .include_router (self .router )
0 commit comments