Skip to content

punitda/modal-flux-lora-trainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Train Flux LoRA on Modal

Use ai-toolkit to train your Flux LoRA on Modal with Gradio UI. No need to setup anything. Just deploy the app and train your LoRA from the UI.

It is useful for training on GPUs with large VRAM like A10G, A100, H100 etc. You can checkout the GPU pricing here.

Demo

Video

How to deploy

  1. Signup for Modal Labs
  2. Create hugging face token with write access to HuggingFace
  3. Add token to env variable under the name HF_TOKEN to Modal secrets. Use the name huggingface-secret for secret
  4. Deploy the app using below commands
# 1. create virtual env (Optional)
python -m venv .venv
source .venv/bin/activate

# 2. install modal
pip install modal

# 3. setup modal - one time setup
modal setup

# 4. deploy the app
modal deploy src/app.py

Training

  1. Open the app URL in the browser
  2. Name your LoRA, add trigger keyword, upload your dataset, configure training parameters and start training
  3. Once training is complete, your LoRA will be saved to HuggingFace repo

Training config

If you want to use advanced options during the training, you can refer to this config on ai-toolkit

About

Train Flux LoRA using UI on Modal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages