Skip to content

Flux uv command stalls out without errors & Torch version 2.9.0 has not been tested with coremltools. #67

Description

@Bersaelor

Model name

flux

Command run

Hey, I'm trying to follow the example from the readme exactly, like I did last year for coremltools too.
So I ran the command

uv run coreai.diffusion.export flux2-klein-4b --platform iOS

Skipping import of cpp extensions due to incompatible torch version. Please upgrade to torch >= 2.11.0 (found 2.9.0).
W0627 17:37:59.487000 79452 torch/distributed/elastic/multiprocessing/redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
Torch version 2.9.0 has not been tested with coremltools. You may run into unexpected errors. Torch 2.7.0 is the most recent version that has been tested.
17:38:11 [INFO] coreai_models.diffusion.pipeline: Loading black-forest-labs/FLUX.2-klein-4B (type=flux2, dtype=torch.float16)...
Unable to import `torchao` Tensor objects. This may affect loading checkpoints serialized with `torchao``

Last year I remember similar issues and having to manually hardset my pytorch version to an older version to get around the Torch version 2.9.0 has not been tested with coremltools but I also see that you set "torch==2.9.0" in python /pyproject.toml so maybe thats not an issue I need to worry about?

macOS / iOS target

macOS 26.5.1

Xcode version

Xcode 27 Beta 2

Python / uv version

uv 0.11.25, Python 3.12.7

Full error output

% uv run coreai.diffusion.export flux2-klein-4b --platform iOS
Skipping import of cpp extensions due to incompatible torch version. Please upgrade to torch >= 2.11.0 (found 2.9.0).
W0627 17:37:59.487000 79452 torch/distributed/elastic/multiprocessing/redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
Torch version 2.9.0 has not been tested with coremltools. You may run into unexpected errors. Torch 2.7.0 is the most recent version that has been tested.
17:38:11 [INFO] coreai_models.diffusion.pipeline: Loading black-forest-labs/FLUX.2-klein-4B (type=flux2, dtype=torch.float16)...
Unable to import `torchao` Tensor objects. This may affect loading checkpoints serialized with `torchao`
Fetching 17 files:   0%|                                                                                                                | 0/17 [00:00<?, ?it/s]

Anything else?

Nothing seems to happen, my internet is working fine but it just sits there at 0%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions