DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to train a FLUX LoRA from a YAML config with AI Toolkit

Copy the example FLUX LoRA config, point it at a captioned image folder and run it from the command line.

Short answer: Clone the repo with git clone https://github.com/ostris/ai-toolkit.git and cd ai-toolkit, then create a venv with python3 -m venv venv and source venv/bin/activate; then install torch as the README shows, then pip3 install -r requirements.txt; Prepare a dataset folder of jpg, jpeg or png images, each with a .txt caption file of the same name. All steps.

  • Top pick
  • Content
  • Advanced
  • half a day
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

legal. Train only on images you have rights to, and follow the base model's license, such as the FLUX.1-dev terms.

Credentials. Gated models need a Hugging Face read token; keep it out of shared configs.

Who it is forA creator who wants a model that reproduces their own style or subject.

The problemBase image models do not know your character, product or art style.

The outcomeA trained LoRA with checkpoints and sample images in an output folder.

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

  1. Clone the repo with git clone https://github.com/ostris/ai-toolkit.git and cd ai-toolkit, then create a venv with python3 -m venv venv and source venv/bin/activate
  2. Install torch as the README shows, then pip3 install -r requirements.txt
  3. Prepare a dataset folder of jpg, jpeg or png images, each with a .txt caption file of the same name
  4. Copy config/examples/train_lora_flux_24gb.yaml into the config folder, edit it following its comments, and run python run.py config/whatever_you_want.yml

Prompt for your agent

Using ostris/ai-toolkit, set up the venv, build a captioned dataset from <my image folder>, copy train_lora_flux_24gb.yaml into config with my dataset path and a trigger word, and start training with python run.py.

Caveat. The README warns that pressing ctrl+c while a checkpoint is saving will likely corrupt it.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for ostris/ai-toolkit and "Train a FLUX LoRA from a YAML config"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer