fal-train

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

fal-train

fal-train

Train custom LoRA models on fal.ai for personalized AI generation.
在fal.ai上训练自定义LoRA模型,实现个性化AI生成。

Scripts

脚本

ScriptPurpose
train.sh
Submit a LoRA training job
脚本用途
train.sh
提交LoRA训练任务

Usage

使用方法

Train Image LoRA (Style/Subject/Person)

训练图像LoRA(风格/主体/人物)

bash
./scripts/train.sh --images-url "https://example.com/training-images.zip" --trigger-word "sks style" --model fal-ai/flux-lora-fast-training
bash
./scripts/train.sh --images-url "https://example.com/training-images.zip" --trigger-word "sks style" --model fal-ai/flux-lora-fast-training

Train Portrait LoRA

训练肖像LoRA

bash
./scripts/train.sh --images-url "https://example.com/face-photos.zip" --trigger-word "ohwx person" --model fal-ai/flux-lora-portrait-trainer
bash
./scripts/train.sh --images-url "https://example.com/face-photos.zip" --trigger-word "ohwx person" --model fal-ai/flux-lora-portrait-trainer

Check Training Status

查看训练状态

bash
./scripts/train.sh --status --endpoint fal-ai/flux-lora-fast-training --request-id "abc123"
bash
./scripts/train.sh --status --endpoint fal-ai/flux-lora-fast-training --request-id "abc123"

Arguments

参数说明

ArgumentDescriptionRequired
--images-url
URL to zip of training imagesYes
--trigger-word
Word to activate the LoRA in promptsYes
--model
/
-m
Training model endpointNo (default: fal-ai/flux-lora-fast-training)
--steps
Training stepsNo (default: 1000)
--status
Check training job statusNo
--endpoint
Endpoint for status checkWith --status
--request-id
Request ID for status checkWith --status
--param
Extra param as key=value (repeatable)No
参数说明是否必填
--images-url
训练图像zip压缩包的URL
--trigger-word
提示词中激活LoRA的触发词
--model
/
-m
训练模型端点否(默认值:fal-ai/flux-lora-fast-training)
--steps
训练步数否(默认值:1000)
--status
查看训练任务状态
--endpoint
状态查询的端点搭配--status使用
--request-id
状态查询的请求ID搭配--status使用
--param
额外参数,格式为key=value(可重复传入)

Finding Models

查找模型

To discover the best and latest training/LoRA models, use the search API:
bash
undefined
如需查找优质的最新训练/LoRA模型,可使用搜索API:
bash
undefined

Search for LoRA training models

搜索LoRA训练模型

bash /mnt/skills/user/fal-generate/scripts/search-models.sh --query "lora training" bash /mnt/skills/user/fal-generate/scripts/search-models.sh --query "trainer" bash /mnt/skills/user/fal-generate/scripts/search-models.sh --query "fine-tune"

Or use the `search_models` MCP tool with keywords like "lora", "training", "trainer", "fine-tune".
bash /mnt/skills/user/fal-generate/scripts/search-models.sh --query "lora training" bash /mnt/skills/user/fal-generate/scripts/search-models.sh --query "trainer" bash /mnt/skills/user/fal-generate/scripts/search-models.sh --query "fine-tune"

或者搭配“lora”、“training”、“trainer”、“fine-tune”这类关键词使用`search_models` MCP工具。

Training Data Tips

训练数据提示

  • People: 10-20 photos, varied angles/lighting/expressions, consistent person
  • Styles: 10-15 images exemplifying the style, diverse subjects
  • Objects: 5-15 photos from different angles on various backgrounds
  • Images should be high quality, at least 512x512
  • Zip all images into a single .zip file and host at a URL
  • 人物:10-20张照片,角度/光线/表情多样,确保为同一人
  • 风格:10-15张能体现目标风格的图像,主体类型多样化
  • 物体:5-15张在不同背景下从不同角度拍摄的目标物体照片
  • 图像应为高质量,分辨率不低于512x512
  • 将所有图像压缩为单个.zip文件并托管在可公开访问的URL上

Output Format

输出格式

json
{
  "diffusers_lora_file": {
    "url": "https://fal.media/files/.../lora.safetensors",
    "content_type": "application/octet-stream",
    "file_name": "lora.safetensors",
    "file_size": 12345678
  },
  "config_file": {
    "url": "https://fal.media/files/.../config.json"
  }
}
Use the
diffusers_lora_file.url
as the
lora_url
parameter when generating images with FLUX models.
json
{
  "diffusers_lora_file": {
    "url": "https://fal.media/files/.../lora.safetensors",
    "content_type": "application/octet-stream",
    "file_name": "lora.safetensors",
    "file_size": 12345678
  },
  "config_file": {
    "url": "https://fal.media/files/.../config.json"
  }
}
使用FLUX模型生成图像时,可将
diffusers_lora_file.url
作为
lora_url
参数传入。