Skip to content

πŸ’… A GitHub Actions workflow template for fine-tuning your own Flux model using the Replicate's API

License

Notifications You must be signed in to change notification settings

zeke/flux-fine-tune-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flux Fine-tune action

This is a template repo for fine-tuning and publishing your own custom Flux model using Replicate and GitHub Actions.

Preqrequisites

  • A paid Replicate account
  • A handful of training images

Training the model

  1. 🐣 Create your own copy of this repository by clicking the green "Use this template" button, then "Create a new repository". Name your new repository whatever you like, and choose whether you want to make it public or private.
  2. πŸ• Remove the cute puppy images in the data directory and replace them with your own images.
  3. πŸ’Ύ Commit your changes to git and push to your main branch on GitHub.
  4. πŸ•΅οΈβ€β™€οΈ Copy your Replicate API token from replicate.com/account and create a repository secret named REPLICATE_API_TOKEN.
  5. 🎬 Trigger the workflow from your GitHub repo page: "Actions" > "Train a model" > "Run workflow".
  6. Go to the replicate.com homepage. At the top of your list of predictions, you'll see a flux prediction in progress. This the request to train your model. Click that prediction to see the progress of the training process.
  7. β˜•οΈ Grab a coffee or a snack and watch the logs roll by! The training process takes a few minutes to run.

Running the model

The duration of the training process varies depending on the number of training steps you specified when running the workflow.

When the training process has completed successfully, it pushes the model to Replicate. You can run it like any other Replicate model, using the website or the API.

To run on the website, go to your dashboard then click on "Models".

Your new model will be private by default, and only visible to you. If you want anyone to be able to see and run your model, you can make it public in the Settings tab on your model page.

To run the model on the web, enter a prompt using the identifier you specified during training, e.g. a pencil sketch of zxz.

To run the model from your own code, click the API tab on your model page for instructions on running with Python, cURL, etc.

To learn more about running models on Replicate, take a look at the Python getting started guide or the HTTP API reference.

If you have questions, open an issue on this repo or contact support.

About

πŸ’… A GitHub Actions workflow template for fine-tuning your own Flux model using the Replicate's API

Resources

License

Stars

Watchers

Forks