If you have a variations XPath like this:
{variations/variant[*]}
<variations>
<variant>
<title>V1</title>
<color>Red</color>
<SKU>V1RED</SKU>
</variant>
<variant>
<title>V2</title>
<color>Red</color>
<SKU>V2RED</SKU>
</variant>
</variations>
You can remove the duplicate "Red" one like this:
{variants/variant[not(./color=preceding-sibling::variant/color)]}