Fix handling mixed masks (#11157)

This commit is contained in:
Nicolas Mowen 2024-04-29 09:58:53 -06:00 committed by GitHub
parent 5bc9f9a388
commit 0c8e155afa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,6 +155,8 @@ def get_relative_coordinates(
relative_masks = [] relative_masks = []
for m in mask: for m in mask:
points = m.split(",") points = m.split(",")
if any(x > "1.0" for x in points):
relative_masks.append( relative_masks.append(
",".join( ",".join(
[ [
@ -163,6 +165,8 @@ def get_relative_coordinates(
] ]
) )
) )
else:
relative_masks.append(m)
mask = relative_masks mask = relative_masks
elif isinstance(mask, str) and any(x > "1.0" for x in mask.split(",")): elif isinstance(mask, str) and any(x > "1.0" for x in mask.split(",")):