From 2edbc7e026d5f287ea7d8d55cd65f1c34f6ac511 Mon Sep 17 00:00:00 2001 From: ciaranbor Date: Fri, 28 Nov 2025 14:29:27 +0000 Subject: [PATCH] Add initialize_mflux function --- src/exo/worker/engines/mflux/utils_mflux.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/exo/worker/engines/mflux/utils_mflux.py diff --git a/src/exo/worker/engines/mflux/utils_mflux.py b/src/exo/worker/engines/mflux/utils_mflux.py new file mode 100644 index 00000000..9dba80a0 --- /dev/null +++ b/src/exo/worker/engines/mflux/utils_mflux.py @@ -0,0 +1,17 @@ +from mflux.config.model_config import ModelConfig +from mflux.models.flux.variants.txt2img.flux import Flux1 + +from exo.shared.types.worker.instances import BoundInstance +from exo.worker.download.download_utils import build_model_path + + +def initialize_mflux(bound_instance: BoundInstance) -> Flux1: + model_id = bound_instance.bound_shard.model_meta.model_id + model_path = build_model_path(model_id) + model = Flux1( + model_config=ModelConfig.from_name(model_name=model_id, base_model=None), + local_path=str(model_path), + # quantize=8, + ) + + return model