cost. Modal bills GPU time; the README default is an A100 40GB with a 2 hour timeout.
Credentials. You authenticate Modal and Hugging Face on your machine; never paste those tokens into configs you share.
Who it is forA creator without a big local GPU.
The problemConsumer laptops cannot train FLUX LoRAs.
The outcomeA LoRA trained in the cloud and downloaded to your machine.
What you need first
- Python >= 3.10 (3.12 recommended), git and a Python venv
- An Nvidia GPU with enough memory for the model you train (example configs target 24GB)
- Node.js > 20 for the web UI, and a Hugging Face token for gated models such as FLUX.1-dev
Steps
- Set up AI Toolkit locally, then run
pip install modalandmodal setupto authenticate - Run
huggingface-cli loginwith a READ token and request access to FLUX.1-dev - Copy an example config from config/examples/modal, edit run_modal.py with your local path, GPU and timeout, then run
modal run run_modal.py --config-file-list-str=/root/ai-toolkit/config/whatever_you_want.yml - Check results with
modal volume ls flux-lora-modelsand download withmodal volume get flux-lora-models your-model-name
Prompt for your agent
Using ostris/ai-toolkit's Modal guide, prepare a config from config/examples/modal for <my dataset>, update run_modal.py, and give me the exact modal run command and the volume commands to fetch the LoRA.
Caveat. Follow the example /root/ai-toolkit paths in the Modal config exactly, as the README stresses.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ostris/ai-toolkit and "Train a LoRA on a rented GPU with Modal"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer