chore: comment out skipping generation code

This commit is contained in:
Radionic
2023-12-07 18:38:12 +08:00
parent 3d25c64b7d
commit a7aea4dbee
+12 -12
View File
@@ -288,18 +288,18 @@ async def post_prompt_block(request):
api_prompt = json.loads(workflow)
# skip generation part if base_image is provided
if base_image is not None:
for value in api_prompt.values():
if (
value["class_type"] == "LoadImageFromRequest"
and value["inputs"]["name"] == image_path
):
del value["inputs"]["image"]
elif (
value["class_type"] == "PreviewImage"
or value["class_type"] == "SaveImage"
):
del value["inputs"]["images"]
# if base_image is not None:
# for value in api_prompt.values():
# if (
# value["class_type"] == "LoadImageFromRequest"
# and value["inputs"]["name"] == image_path
# ):
# del value["inputs"]["image"]
# elif (
# value["class_type"] == "PreviewImage"
# or value["class_type"] == "SaveImage"
# ):
# del value["inputs"]["images"]
res = post_prompt({"prompt": api_prompt})
prompt_id = json.loads(res.text)["prompt_id"]