fix the problem of ruff of github
This commit is contained in:
parent
1242ba08e1
commit
d859de37d9
|
@ -338,7 +338,7 @@ class Api:
|
||||||
|
|
||||||
def text2imgapi(self, txt2imgreq: models.StableDiffusionTxt2ImgProcessingAPI):
|
def text2imgapi(self, txt2imgreq: models.StableDiffusionTxt2ImgProcessingAPI):
|
||||||
task_id = create_task_id("text2img")
|
task_id = create_task_id("text2img")
|
||||||
if txt2imgreq.force_task_id != None:
|
if txt2imgreq.force_task_id is None:
|
||||||
task_id = txt2imgreq.force_task_id
|
task_id = txt2imgreq.force_task_id
|
||||||
|
|
||||||
script_runner = scripts.scripts_txt2img
|
script_runner = scripts.scripts_txt2img
|
||||||
|
@ -396,7 +396,7 @@ class Api:
|
||||||
|
|
||||||
def img2imgapi(self, img2imgreq: models.StableDiffusionImg2ImgProcessingAPI):
|
def img2imgapi(self, img2imgreq: models.StableDiffusionImg2ImgProcessingAPI):
|
||||||
task_id = create_task_id("img2img")
|
task_id = create_task_id("img2img")
|
||||||
if img2imgreq.force_task_id != None:
|
if img2imgreq.force_task_id is None:
|
||||||
task_id = img2imgreq.force_task_id
|
task_id = img2imgreq.force_task_id
|
||||||
|
|
||||||
init_images = img2imgreq.init_images
|
init_images = img2imgreq.init_images
|
||||||
|
|
|
@ -1359,7 +1359,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
||||||
inpainting_mask_invert: int = 0
|
inpainting_mask_invert: int = 0
|
||||||
initial_noise_multiplier: float = None
|
initial_noise_multiplier: float = None
|
||||||
latent_mask: Image = None
|
latent_mask: Image = None
|
||||||
force_task_id: string = None
|
force_task_id: str = None
|
||||||
|
|
||||||
image_mask: Any = field(default=None, init=False)
|
image_mask: Any = field(default=None, init=False)
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ def setup_progress_api(app):
|
||||||
return app.add_api_route("/internal/progress", progressapi, methods=["POST"], response_model=ProgressResponse)
|
return app.add_api_route("/internal/progress", progressapi, methods=["POST"], response_model=ProgressResponse)
|
||||||
|
|
||||||
def get_pending_tasks():
|
def get_pending_tasks():
|
||||||
pending_tasks_ids = [x for x in pending_tasks]
|
pending_tasks_ids = list(pending_tasks)
|
||||||
pending_len = len(pending_tasks_ids)
|
pending_len = len(pending_tasks_ids)
|
||||||
return PendingTasksResponse(size=pending_len, tasks=pending_tasks_ids)
|
return PendingTasksResponse(size=pending_len, tasks=pending_tasks_ids)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue