跳转到内容

FLUX.1 [dev] Fill with LoRAs

集成

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

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

此请求: ≈$0.07 70 API 积分 在此页面运行

获取 API 密钥
Black Forest Labs 图像编辑 #editing#lora

使用 LoRA 进行 Fill 风格修复,支持蒙版区域参考图和回贴控制

在 Doitong 上制作

Doitong 社区使用 FLUX.1 [dev] Fill with LoRAs 制作的公开作品。一键复用提示词。

显示的公开作品数:9
Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lemb...

Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi...

Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lemb...

Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi...

Prompt Details Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut ...

Prompt Details Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi...

Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikel...

Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi wajahnya. Ia memeluk...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat men...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat menggemaskan dengan mata cokelat besar yang ekspresif, rambut hitam berantakan yang tebal, mengenakan kaus putih kerah henley. Dia berpose dengan kedua tangan terkatup di depan dada, menunjukkan senyum...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat men...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat menggemaskan dengan mata cokelat besar yang ekspresif, rambut hitam berantakan yang tebal, mengenakan kaus putih kerah henley. Dia berpose dengan kedua tangan terkatup di depan dada, menunjukkan senyum...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat men...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat menggemaskan dengan mata cokelat besar yang ekspresif, rambut hitam berantakan yang tebal, mengenakan kaus putih kerah henley. Dia berpose dengan kedua tangan terkatup di depan dada, menunjukkan senyum...

Foto sinematik hiper-realistis resolusi tinggi menampilkan seorang pria muda Indonesia dengan tub...

Foto sinematik hiper-realistis resolusi tinggi menampilkan seorang pria muda Indonesia dengan tubuh ramping dan proporsional, rambut hitam pendek agak acak, mengenakan jaket kulit hitam, celana riding fit, dan sepatu motor. Ia sedang melakukan aksi freestyle ekstrem dengan motor sport 500cc...

构建请求

控件根据模型架构生成。修改控件时,代码和价格会同步更新。

默认

引导图像生成的提示词。

•必填 image_url
拖放文件,或

用于填充操作的图像 URL。

•必填 mask_url
拖放文件,或

定义图像修复区域的蒙版。

image_size

生成图像的尺寸。

num_images 默认 1

设置要生成的图像数量;输出以流式传输时固定为 1。

高级 output_format · acceleration · num_inference_steps · guidance_scale · seed · enable_safety_checker · paste_back · resize_to_original · loras · fill_image
output_format 默认 jpeg

生成图像的文件格式。

acceleration 默认 none

图像生成加速设置。选择 'regular' 可平衡速度和质量。

默认 28

要执行的推理步数。

默认 30

图像选择的提示词遵循强度,以 CFG(Classifier Free Guidance)表示。

用于生成可复现图像的种子:模型版本不变时,相同的提示词和种子会生成相同图像。

默认 []

其组合效果用于生成图像的 LoRA,数量不限。

提供图像填充输入,以便将选定的图像内容放入蒙版内。

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

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

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 FLUX.1 [dev] Fill with LoRAs

使用 `mask_url` 填充 `image_url` 的蒙版区域,可选传入 `prompt` 和任意数量的 `loras`。`fill_image` 可为蒙版区域提供内容。`paste_back` 保留原图未蒙版区域,`resize_to_original` 恢复源图尺寸。`guidance_scale` 范围为 28 到 35,并返回 1 到 4 张图像。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
prompt可选
类型string
默认值
引导图像生成的提示词。
image_size可选
类型object
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
生成图像的尺寸。
num_inference_steps可选
类型integer
默认值28
1 – 50
要执行的推理步数。
seed可选
类型integer | null
用于生成可复现图像的种子:模型版本不变时,相同的提示词和种子会生成相同图像。
loras可选
类型object[]
默认值[]
其组合效果用于生成图像的 LoRA,数量不限。
loras[].path必填
类型string
LoRA 权重的位置,以 URL 或路径指定。
loras[].scale可选
类型number
默认值1
0 – 4
合并到基础模型前应用于 LoRA 权重的倍数。
guidance_scale可选
类型number
默认值30
28 – 35
图像选择的提示词遵循强度,以 CFG(Classifier Free Guidance)表示。
num_images可选 num_outputs
类型integer
默认值1
1 – 4
设置要生成的图像数量;输出以流式传输时固定为 1。
enable_safety_checker可选
类型boolean
默认值true
安全检查:对于被标记为不安全的图像,返回黑色图像代替。true 启用检查;false 仅对已授权账户禁用检查,未授权请求无论如何都会接受检查。
output_format可选
类型enum
默认值jpeg
jpegpng
生成图像的文件格式。
acceleration可选
类型enum
默认值none
noneregular
图像生成加速设置。选择 'regular' 可平衡速度和质量。
image_url必填 image
类型url · image
用于填充操作的图像 URL。
mask_url必填 mask
类型url · image
定义图像修复区域的蒙版。
paste_back可选
类型boolean
默认值true
启用后,从输出中图像修复区域以外的区域恢复原图像素。
fill_image可选
类型object
提供图像填充输入,以便将选定的图像内容放入蒙版内。
fill_image.fill_image_url可选
类型url[] · image
指定要插入蒙版区域内容的图像 URL。
fill_image.in_context_fill可选
类型boolean
默认值false
使用所提供的填充图像时,将基础图像作为上下文,以提高填充保真度。
fill_image.use_prompt可选
类型boolean
默认值false
启用后,将提示词作为额外的生成输入,与 redux 图像一同使用。
resize_to_original可选
类型boolean
默认值false
保留所提供图像精确尺寸的调整选项:处理后恢复原始尺寸。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-lora-fill",
  "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": 70,
    "usd": "0.07",
    "charged": 70,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mask_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "width": 1024,
        "height": 768,
        "content_type": "image/jpeg"
      }
    ],
    "timings": {},
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
文件由你选择每个 outputs[].url 都是我们存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
所有模型的结构一致图像、视频和音频的字段均为 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
images
array of object {url, width, height, content_type}生成图像的文件信息。
timings
object
seed
integer图像生成种子:如果输入未提供种子,则包含随机选择的值;否则重复使用所提供的值。
has_nsfw_concepts
array of boolean指示生成的图像中是否出现 NSFW 概念。
prompt
string图像生成期间使用的提示词。

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh-CN/developers/models/flux-lora-fill.md. 所有模型和指南: https://doitong.com/developers/llms.txt