Skip to content

Train Flux LoRAs For Portraits

Integrate

Model id flux-lora-portrait-trainer
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/flux-lora-portrait-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $6.00 6,000 API credits your files are measured before the run Run it on this page

Get API key
Black Forest Labs Training #lora#personalization

FLUX LoRA trainer tuned for portraits, with subject cropping and checkpoint resume

Black Forest Labs · File

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Supply a ZIP archive URL for consistently styled images, optionally accompanied by caption text files named to match their images. Caption text may contain `[trigger]`; specifying trigger_word replaces that placeholder with its value. Aim for at least 10 images, with larger sets preferred.

default 2500

Training step count for the LoRA.

Advanced trigger_phrase · data_archive_format · resume_from_checkpoint · learning_rate · multiresolution_training · subject_crop · create_masks

Supply a trigger phrase to replace `[trigger]` in existing captions or to serve as the caption when none are supplied (trigger_work). None disables the trigger word.

Archive format, inferred from its URL when omitted.

default

Checkpoint URL for resuming training.

default 9.0e-05

Learning rate applied during training.

POST /run/flux-lora-portrait-trainer?wait=20 quote → $6.00
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/flux-lora-portrait-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Train Flux LoRAs For Portraits

Trains a portrait-focused LoRA from a zip of images at `images_data_url`; at least 10 are suggested. Options include `trigger_phrase`, `learning_rate` (1e-6 to 0.001), `steps` (default 2500, max 10000), `subject_crop`, multiresolution training and `resume_from_checkpoint`. Returns weights and config.

Parameters

NameType DefaultAllowed Description
images_data_urlrequired
Typestring
Supply a ZIP archive URL for consistently styled images, optionally accompanied by caption text files named to match their images. Caption text may contain `[trigger]`; specifying trigger_word replaces that placeholder with its value. Aim for at least 10 images, with larger sets preferred.
trigger_phraseoptional
Typestring | null
Supply a trigger phrase to replace `[trigger]` in existing captions or to serve as the caption when none are supplied (trigger_work). None disables the trigger word.
learning_rateoptional
Typenumber
Default9.0e-05
0.000001 – 0.001
Learning rate applied during training.
stepsoptional
Typeinteger
Default2500
1 – 10,000
Training step count for the LoRA.
multiresolution_trainingoptional
Typeboolean
Defaulttrue
Enables training at multiple resolutions when True.
subject_cropoptional
Typeboolean
Defaulttrue
Enables cropping the subject out of the image when True.
data_archive_formatoptional
Typestring | null
Archive format, inferred from its URL when omitted.
resume_from_checkpointoptional
Typestring
Default
Checkpoint URL for resuming training.
create_masksoptional
Typeboolean
Defaultfalse
Enables subject mask creation when True.
required

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-lora-portrait-trainer",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 6000,
    "usd": "6.00",
    "charged": 6000,
    "refunded": 0
  },
  "input": {
    "images_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "diffusers_lora_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "config_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
diffusers_lora_file
object {url, content_type, file_name, file_size}URL pointing to the trained LoRA weights in diffusers format.
config_file
object {url, content_type, file_name, file_size}Training configuration file URL.

For AI agents: this page as Markdown is at https://doitong.com/developers/models/flux-lora-portrait-trainer.md. All models and guides: https://doitong.com/developers/llms.txt