အကြောင်းအရာသို့ ကျော်ရန်

Train Flux LoRAs For Portraits

ပေါင်းစည်းရန်

မော်ဒယ် 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"

နမူနာကဲ့သို့ ဖိုင်များ: ၆.၀၀ $ ၆,၀၀၀ API ခရက်ဒစ် လုပ်ဆောင်မီ သင့်ဖိုင်များကို တိုင်းတာသည် ဤစာမျက်နှာတွင် လုပ်ဆောင်ရန်

API ကီး ရယူရန်
Black Forest Labs လေ့ကျင့်ခြင်း #lora#personalization

ပုံတူများအတွက် ချိန်ညှိထားသော FLUX LoRA လေ့ကျင့်ကိရိယာ၊ အကြောင်းအရာ ဖြတ်တောက်ခြင်းနှင့် Checkpoint မှ ပြန်လည်စတင်ခြင်း ပါဝင်သည်

Black Forest Labs · ဖိုင်

သင့်ပထမဆုံးရလဒ် ဤနေရာတွင် ပေါ်လာမည်

အောက်တွင် တောင်းဆိုချက်တစ်ခု တည်ဆောက်ပြီး သင့် API ကီးဖြင့် လုပ်ဆောင်ပါ။ ထွက်ရလဒ်များကို ကျွန်ုပ်တို့၏ သိုလှောင်မှုသို့ ကူးယူပြီး အမြဲတမ်း သို့မဟုတ် ၇ ရက် အခမဲ့ သိမ်းထားသည်။

တောင်းဆိုမှုတစ်ခု တည်ဆောက်ရန်

ထိန်းချုပ်မှုများကို မော်ဒယ် schema မှ အလိုအလျောက်ဖန်တီးသည်။ ၎င်းတို့ကို ပြောင်းလဲသည်နှင့် code နှင့် စျေးနှုန်းတို့လည်း ပြောင်းလဲမည်။

•လိုအပ်သည်

ပုံများ၏ စတိုင်ကို တစ်သမတ်တည်းဖြစ်စေရန် ZIP မှတ်တမ်းဖိုင် URL ကို ပေးပါ။ ပုံများနှင့် ကိုက်ညီသည့် အမည်များဖြင့် caption စာသားဖိုင်များကိုလည်း ထည့်နိုင်သည်။ Caption စာသားတွင် `[trigger]` ပါဝင်နိုင်ပြီး trigger_word သတ်မှတ်ပါက ထိုနေရာတွင် ၎င်း၏တန်ဖိုးကို အစားထိုးမည်။ အနည်းဆုံး ပုံ 10 ပုံ အသုံးပြုရန် ရည်ရွယ်ပါ၊ ပိုများသောအစုများကို ပိုမိုနှစ်သက်သည်။

မူလ 2500

LoRA အတွက် လေ့ကျင့်မှုအဆင့် အရေအတွက်။

အဆင့်မြင့် trigger_phrase · data_archive_format · resume_from_checkpoint · learning_rate · multiresolution_training · subject_crop · create_masks

ရှိပြီးသား caption များထဲရှိ `[trigger]` ကို အစားထိုးရန် သို့မဟုတ် caption မပေးထားပါက caption အဖြစ် အသုံးပြုရန် trigger စကားစုကို ပေးပါ (trigger_work)။ None သည် trigger word ကို ပိတ်ထားသည်။

မသတ်မှတ်ထားပါက URL မှ ခန့်မှန်းယူသည့် archive format။

မူလ

လေ့ကျင့်မှုကို ဆက်လက်လုပ်ဆောင်ရန် checkpoint URL။

မူလ 9.0e-05

လေ့ကျင့်နေစဉ် အသုံးပြုသည့် learning rate။

POST /run/flux-lora-portrait-trainer?wait=20 ကုန်ကျစရိတ် → ၆.၀၀ $
# 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"

ဤတောင်းဆိုချက်ကို လုပ်ဆောင်ရန်

သင့် key သည် ဤဘရောက်ဇာထဲတွင်သာ ရှိမည်ဖြစ်ပြီး Doitong API သို့သာ ပို့မည်။ Remember ကို အမှန်ခြစ်ထားမှသာ (localStorage) တွင် သိမ်းမည်။ API ကီး ရယူရန်

Train Flux LoRAs For Portraits အကြောင်း

`images_data_url` ရှိ ပုံများ၏ zip ဖိုင်မှ ပုံတူအာရုံစိုက် LoRA ကို လေ့ကျင့်ပေးသည်။ အနည်းဆုံး 10 ပုံ အကြံပြုသည်။ `trigger_phrase`၊ `learning_rate` (1e-6 မှ 0.001)၊ `steps` (မူလတန်ဖိုး 2500၊ အများဆုံး 10000)၊ `subject_crop`၊ မျိုးစုံကြည်လင်ပြတ်သားမှု လေ့ကျင့်ခြင်းနှင့် `resume_from_checkpoint` တို့ ပါဝင်သည်။ Weights နှင့် config ကို ပြန်ပေးသည်။

ပါရာမီတာများ

အမည်အမျိုးအစား မူလတန်ဖိုးခွင့်ပြုထားသည် ဖော်ပြချက်
images_data_urlလိုအပ်သည်
အမျိုးအစားstring
ပုံများ၏ စတိုင်ကို တစ်သမတ်တည်းဖြစ်စေရန် ZIP မှတ်တမ်းဖိုင် URL ကို ပေးပါ။ ပုံများနှင့် ကိုက်ညီသည့် အမည်များဖြင့် caption စာသားဖိုင်များကိုလည်း ထည့်နိုင်သည်။ Caption စာသားတွင် `[trigger]` ပါဝင်နိုင်ပြီး trigger_word သတ်မှတ်ပါက ထိုနေရာတွင် ၎င်း၏တန်ဖိုးကို အစားထိုးမည်။ အနည်းဆုံး ပုံ 10 ပုံ အသုံးပြုရန် ရည်ရွယ်ပါ၊ ပိုများသောအစုများကို ပိုမိုနှစ်သက်သည်။
trigger_phraseရွေးချယ်နိုင်သည်
အမျိုးအစားstring | null
ရှိပြီးသား caption များထဲရှိ `[trigger]` ကို အစားထိုးရန် သို့မဟုတ် caption မပေးထားပါက caption အဖြစ် အသုံးပြုရန် trigger စကားစုကို ပေးပါ (trigger_work)။ None သည် trigger word ကို ပိတ်ထားသည်။
learning_rateရွေးချယ်နိုင်သည်
အမျိုးအစားnumber
မူလတန်ဖိုး9.0e-05
၀.၀၀၀၀၀၁ – ၀.၀၀၁
လေ့ကျင့်နေစဉ် အသုံးပြုသည့် learning rate။
stepsရွေးချယ်နိုင်သည်
အမျိုးအစားinteger
မူလတန်ဖိုး2500
၁ – ၁၀,၀၀၀
LoRA အတွက် လေ့ကျင့်မှုအဆင့် အရေအတွက်။
multiresolution_trainingရွေးချယ်နိုင်သည်
အမျိုးအစားboolean
မူလတန်ဖိုးtrue
True ဖြစ်ပါက ရုပ်ထွက်အရည်အသွေး အမျိုးမျိုးဖြင့် လေ့ကျင့်ခြင်းကို ဖွင့်ပေးသည်။
subject_cropရွေးချယ်နိုင်သည်
အမျိုးအစားboolean
မူလတန်ဖိုးtrue
True ဖြစ်ပါက ပုံထဲမှ အကြောင်းအရာကို ဖြတ်ထုတ်ခြင်းကို ဖွင့်ပေးသည်။
data_archive_formatရွေးချယ်နိုင်သည်
အမျိုးအစားstring | null
မသတ်မှတ်ထားပါက URL မှ ခန့်မှန်းယူသည့် archive format။
resume_from_checkpointရွေးချယ်နိုင်သည်
အမျိုးအစားstring
မူလတန်ဖိုး
လေ့ကျင့်မှုကို ဆက်လက်လုပ်ဆောင်ရန် checkpoint URL။
create_masksရွေးချယ်နိုင်သည်
အမျိုးအစားboolean
မူလတန်ဖိုးfalse
True ဖြစ်ပါက အကြောင်းအရာ mask ဖန်တီးခြင်းကို ဖွင့်ပေးသည်။
လိုအပ်သည်

ထွက်ရလဒ်

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"
  }
}
သင့်ဖိုင်များ၊ သင့်ရွေးချယ်မှုoutputs[].url တိုင်းသည် ကျွန်ုပ်တို့၏ သိုလှောင်မှုရှိ မိတ္တူဖြစ်သည်- အမြဲတမ်း (GB-month အလိုက် ငွေပေးရသည်) သို့မဟုတ် ၇ ရက် အခမဲ့၊ သင့်အကောင့်ဆက်တင် သို့မဟုတ် ?storage= ဖြင့် သိမ်းထားသည်။
မော်ဒယ်တိုင်းတွင် ပုံစံတူပုံ၊ ဗီဒီယိုနှင့် အသံတို့အတွက် type၊ url၊ content_type၊ width၊ height နှင့် duration။ output သည် မော်ဒယ်ကိုယ်တိုင်၏ ရလဒ် object ဖြစ်သည်။
ထွက်ရလဒ်၏ Fields များ
diffusers_lora_file
object {url, content_type, file_name, file_size}diffusers ဖော်မတ်ရှိ လေ့ကျင့်ပြီး LoRA weights သို့ ညွှန်ပြသည့် URL။
config_file
object {url, content_type, file_name, file_size}လေ့ကျင့်မှု ဖွဲ့စည်းပုံဖိုင် URL။

AI အေးဂျင့်များအတွက်- ဤစာမျက်နှာ၏ Markdown ကို ဤနေရာတွင် ရရှိနိုင်သည် https://doitong.com/my/developers/models/flux-lora-portrait-trainer.md. မော်ဒယ်များနှင့် လမ်းညွှန်များအားလုံး: https://doitong.com/developers/llms.txt