def expand_cli_args(args):
    """
    Expand a list of possibly comma separated arguments, removing duplicates.

    :param args: The list of arguments to expand.
    :return: The set of unique arguments.
    """
    items = set()
    for arg in args:  # "a.jpg,b.png"
        for arg_ in [n.strip() for n in arg.split(',')]:  # "a.jpg"|"b.jpg"
            items.add(arg_)
    return items