Skip to content

Conversation

davidjurado
Copy link
Contributor

@davidjurado davidjurado commented Oct 3, 2025

MLCube for Flux.1-schnell

MLCube™ GitHub repository. MLCube™ wiki.

Project setup

An important requirement is that you must have Docker installed.

# Create Python environment and install MLCube Docker runner 
virtualenv -p python3 ./env && source ./env/bin/activate && pip install pip==24.0 && pip install mlcube-docker
# Fetch the implementation from GitHub
git clone https://github.com/mlcommons/training && cd ./training
git fetch origin pull/839/head:feature/mlcube_flux && git checkout feature/mlcube_flux
cd ./text_to_image/mlcube

Inside the mlcube directory run the following command to check implemented tasks.

mlcube describe

 Extra requirements

You need to download the torchtitan git submodule:

git submodule update --init --recursive

You also need accept the license for the FLUX schnell model on Hugginface.

Finally, to be able to download all the models you will need to get a token from Hugginface.

Note: Make sure that when creating the token you select:

  • Read access to contents of all public gated repos you can access

After that you can set a new enviroment variable, like this:

export HUGGING_FACE_HUB_TOKEN="YOUR_TOKEN"

MLCube tasks

  • Demo tasks:

Download demo dataset and models.

mlcube run --task=download_demo -Pdocker.build_strategy=always

Train demo.

mlcube run --task=demo -Pdocker.build_strategy=always

Execute the complete pipeline

You can execute the complete pipeline with one single command.

  • Demo pipeline:
mlcube run --task=download_demo,demo -Pdocker.build_strategy=always

Note: To rebuild the image use the flag: -Pdocker.build_strategy=always during the mlcube run command.

Copy link

github-actions bot commented Oct 3, 2025

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@davidjurado davidjurado changed the title Add MLcube implementation for Flux MLcube implementation for Flux.1-schnell Oct 3, 2025
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.

1 participant