Multisort with supersort plugin
Try to group the entries sorted by size using the group filter:

{% set entriesSorted = entries|supersort('sortAs', '{ size }', SORT_NUMERIC) %}
{% set entriesByBrand = entriesSorted|group('brand.first.title') %}
{% set entriesByBrand = entriesByBrand|supersort('ksort') %}

{% for brand, entriesInBrand in entriesByBrand %}
    {% for entry in entriesInBrand %}
        &lt;li&gt;{{ entry.title }}&lt;/li&gt;
    {% endfor %}
{% endfor %}