diff --git a/integrations/hermes-athena-image/__init__.py b/integrations/hermes-athena-image/__init__.py index d84b61b..2510d9c 100644 --- a/integrations/hermes-athena-image/__init__.py +++ b/integrations/hermes-athena-image/__init__.py @@ -212,7 +212,10 @@ class AthenaLocalImageProvider(ImageGenProvider): if isinstance(image_url, str) and image_url.strip(): sources.append(image_url.strip()) sources.extend(normalize_reference_images(reference_image_urls) or []) - sources = sources[:4] + # Hermes may expose the primary upload through both ``image_url`` and + # ``reference_image_urls``. Preserve order while removing duplicates; + # restoration deliberately accepts exactly one physical source image. + sources = list(dict.fromkeys(sources))[:4] model = _select_model(kwargs.get("model")) try: encoded_sources = [