mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-05-02 08:20:09 +08:00
Don't return coordinates as list if only one spline
This commit is contained in:
parent
9682804efb
commit
f35bb4d336
@ -255,7 +255,7 @@ output types:
|
|||||||
masks_out = masks_out.mean(dim=-1)
|
masks_out = masks_out.mean(dim=-1)
|
||||||
|
|
||||||
if bg_image is None:
|
if bg_image is None:
|
||||||
return (masks_out, json.dumps(coordinates), out_floats, len(out_floats), json.dumps(all_normalized))
|
return (masks_out, json.dumps(coordinates if len(coordinates) > 1 else coordinates[0]), out_floats, len(out_floats), json.dumps(all_normalized))
|
||||||
else:
|
else:
|
||||||
transform = transforms.ToPILImage()
|
transform = transforms.ToPILImage()
|
||||||
image = transform(bg_image[0].permute(2, 0, 1))
|
image = transform(bg_image[0].permute(2, 0, 1))
|
||||||
@ -268,7 +268,7 @@ output types:
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"ui": {"bg_image": [img_base64]},
|
"ui": {"bg_image": [img_base64]},
|
||||||
"result": (masks_out, json.dumps(coordinates), out_floats, len(out_floats), json.dumps(all_normalized))
|
"result": (masks_out, json.dumps(coordinates if len(coordinates) > 1 else coordinates[0]), out_floats, len(out_floats), json.dumps(all_normalized))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user