Fal lora training
Skill shahshrey/fal-portrait-lora-skills/skills/fal-lora-training
Validates, uploads, submits, monitors, and persists fal portrait LoRA training runs using fal-ai/flux-lora-portrait-trainer. Use when the user asks to train, fine-tune, start, submit, or monitor a portrait/person LoRA from a prepared ZIP; or mentions images_data_url, trigger_phrase, portrait trainer, training steps, learning rate, LoRA weights, or a fal training request.From its SKILL.md
npx -y skills add shahshrey/fal-portrait-lora-skills --skill fal-lora-trainingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.2 KB, 727 tokens by cl100k_base, as published. Nobody here has run it
fal Portrait LoRA Training
Train a prepared dataset with fal-ai/flux-lora-portrait-trainer.
Defaults
| Setting | Default |
|---|---|
| Endpoint | fal-ai/flux-lora-portrait-trainer |
| Steps | 2500 |
| Learning rate | 0.00009 |
| Multiresolution | true |
| Subject crop | true |
| Create masks | false |
| Captions | Matching .txt, beginning with [trigger] |
Paid-submission rule
Training is a paid external action.
- If the current user request explicitly says to start, submit, run, or train, proceed without asking twice.
- Otherwise, show endpoint and settings and ask for confirmation.
- Pass
--yesonly after one of those conditions is met.
Workflow
Resolve the project-local skill first:
SKILL_DIR=".cursor/skills/fal-lora-training"
[ -d "$SKILL_DIR" ] || SKILL_DIR="$HOME/.cursor/skills/fal-lora-training"
[ -d "$SKILL_DIR" ] || SKILL_DIR="skills/fal-lora-training"
1. Validate the archive
.venv/bin/python "$SKILL_DIR/scripts/validate_dataset.py" \
"/path/to/dataset.zip" \
--require-placeholder
Do not submit unless validation passes. The archive must be flat, contain at
least ten images, pair every image with a same-stem .txt, and use [trigger]
captions.
2. Confirm settings
Ask if missing:
- Dataset ZIP path
- Trigger phrase
- Output directory for request/result JSON
Use defaults unless the user specifies different portrait-training values. An endpoint override is allowed only when it accepts the same input schema. See references/portrait-trainer-schema.md.
3. Submit and monitor
Run as a background command because training is long-running:
.venv/bin/python "$SKILL_DIR/scripts/train_portrait_lora.py" \
--archive "/path/to/dataset.zip" \
--trigger-phrase "ohwx man" \
--output-dir "./portrait_training_run" \
--env ".env" \
--yes
The script:
- Revalidates the ZIP.
- Uploads it with
fal_client.upload_file. - Submits
images_data_urlto the portrait endpoint. - Writes
training_request.jsonimmediately. - Waits for completion.
- Writes
training_result.jsoncontaining LoRA and config URLs.
After backgrounding, read the command output once to confirm it reached
SUBMITTED request_id=.... Rely on completion notification rather than
frequent polling.
4. Deliver
Report:
- Request ID
- Endpoint and settings
- Dataset image count
- Trigger phrase
- LoRA weights URL
- Config URL
Authentication
Requires fal-client and either FAL_KEY or FAL_API_KEY. The script maps
FAL_API_KEY to the client-compatible FAL_KEY variable without printing it.
Scripts
| Script | Purpose |
|---|---|
scripts/validate_dataset.py | Validate flat image/caption ZIP contract |
scripts/train_portrait_lora.py | Upload, submit, monitor, persist results |
What ships with it: 3 files
9.3 KB alongside SKILL.md, 2 of them executable
references/
scripts/
- train_portrait_lora.pyruns4.3 KB
- validate_dataset.pyruns3.9 KB