Skip to content

Conversation

@ciaranbor
Copy link
Member

Motivation

Changes

Why It Works

Test Plan

Manual Testing

Automated Testing

@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch 12 times, most recently from 02bfd7b to 0783aaf Compare January 7, 2026 11:12
model_card = MODEL_CARDS[model_id]
return model_card

for _, model_card in MODEL_CARDS.items():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opinion, not functionality - we should change the MODEL_CARDS to be keyed by model_id and drop the model_id field from them. the short ids are confusing.

user: str | None = None


class ImageEditsTaskParams(BaseModel):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential / TODO / your discretion: OpenAI API compat here.

)

self.command_task_mapping[command.command_id] = task_id
case ImageGeneration():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you mentioned, seems the most generic code - ideally we'd delegate to a load balancer here I suppose.

n: int | None = 1
quality: Literal["high", "medium", "low"] | None = "medium"
output_format: Literal["png", "jpeg", "webp"] = "png"
response_format: Literal["url", "b64_json"] | None = "b64_json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't support url

from pathlib import Path
from typing import Callable, Literal
from urllib.parse import urljoin
from huggingface_hub._snapshot_download import snapshot_download
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private download?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say I'm a huge fan, but that's all of download_utils.

from exo.worker.runner.bootstrap import logger


class DistributedImageModel:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok surely this should actually be a dataclass

if (
not isinstance(task, ChatCompletion)
and not isinstance(task, ImageGeneration)
and not isinstance(task, ImageEdits)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not isinstance(task, (ChatCompletion, ImageGeneration, ImageEdits)) works

@Evanev7
Copy link
Member

Evanev7 commented Jan 7, 2026

We've discussed plenty, my review is mostly to submit comments that are mainly stylistic. My main aims are to standardise what data we use to shard and parallelise and evaluate model scheduling and placement.

@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch 16 times, most recently from 791bbb1 to 3a579cc Compare January 8, 2026 13:02
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from ad5703f to b644490 Compare January 17, 2026 15:07
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from b644490 to 29191b0 Compare January 17, 2026 15:21
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from d3c1e6a to 01148d5 Compare January 17, 2026 16:24
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from 0fa5f0f to 5ac44a0 Compare January 17, 2026 19:12
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from 2668c6c to a315e68 Compare January 17, 2026 22:35
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from cad4502 to 4519548 Compare January 18, 2026 10:33
@ciaranbor ciaranbor force-pushed the ciaran/image-generation branch from c1fb4a5 to 04cd02b Compare January 18, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants