Skip to content

FLUX.1 [dev] with Controlnets and Loras · Rf Inversion

Integrate

Model id flux-general/rf-inversion
# 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-general/rf-inversion?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image": "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"

This request: ≈$0.025 25 API credits Run it on this page

Get API key
Black Forest Labs Image Editing Reference inputs #rf-inversion#editing#lora

Prompt-based editing of a reference image through RF inversion

Made on Doitong

Public works made with FLUX.1 [dev] with Controlnets and Loras by the Doitong community. Reuse a prompt in one click.

Public works shown: 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...

Build a request

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

•required

Prompt guiding edits to the image.

•required image_url
Drop a file, or

Image URL identifying the editing input.

image_size

Dimensions of the generated image.

num_images default 1

Set how many images to generate; this choice is fixed at 1 when output is streamed.

Advanced negative_prompt · reference_image_url · output_format · scheduler · reverse_guidance_schedule · sigma_schedule · num_inference_steps · guidance_scale · reference_strength · reference_start · reference_end · base_shift · max_shift · nag_scale · nag_tau · nag_alpha · nag_end · controller_guidance_forward · controller_guidance_reverse · reverse_guidance_start · reverse_guidance_end · seed · use_cfg_zero · enable_safety_checker · use_beta_schedule · loras · control_loras · controlnets · controlnet_unions · easycontrols · fill_image
default

Negative prompt processed with NAG by default to discourage the specified unwanted features in generated images.

Drop a file, or

Image URL used for Reference-Only guidance.

output_format default png

File format for the resulting image.

scheduler default euler

Scheduler used during denoising.

reverse_guidance_schedule default constant

Schedule controlling the application of reverse guidance.

Sigma schedule used during denoising.

default 28

Count of inference steps to run.

default 3.5

Prompt-adherence strength for image selection, expressed as CFG (Classifier Free Guidance).

default 0.65

Reference-image influence during reference_only generation; without a supplied reference image, this strength setting has no effect.

default 0

Reference guidance start point, expressed as a percentage of all timesteps.

default 1

Reference guidance end point, expressed as a percentage of all timesteps.

default 0.5

Baseline shift applied to scheduled timesteps.

default 1.15

Maximum shift applied to scheduled timesteps.

default 3

Negative-prompt avoidance controlled by the NAG scale: increasing it makes the generated image less like the negative description.

default 2.5

NAG tau setting for hidden-state normalization; leaving it unchanged is recommended. Raising it weakens normalization and risks unexpected departures from the original image.

default 0.25

NAG alpha sets how much the positive prompt redirects normalized guidance combining the positive and negative prompts. This final weighting gives the positive prompt more influence at lower settings and reduces redirection at higher settings.

default 0.25

NAG cutoff expressed as a proportion of the generation steps. FLUX's original attention processors take over after NAG has run for that initial proportion.

default 0.6

Controller guidance (gamma) for generating structured noise.

default 0.75

Set eta, the denoising controller's guidance value; an image more similar to the input is obtained with settings nearer 1.

default 0

Starting timestep for guidance in the reverse process.

default 8

Ending timestep for guidance in the reverse process.

Seed for reproducible images: an identical prompt and seed produce an identical image when the model version is unchanged.

default []

LoRAs whose combined effect produces the generated image, with no limit on how many you supply.

default []

Control-image LoRAs merged into a combined configuration for generating the final image; the number supplied is unrestricted.

default []

ControlNet configuration for image generation, currently limited to a single ControlNet.

default []

ControlNet union configuration for image generation, subject to the current single-ControlNet restriction.

default []

EasyControl inputs applied during image generation.

Input image that guides generation and can supply content for masked regions.

POST /run/flux-general/rf-inversion?wait=20 quote → $0.025
# 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-general/rf-inversion?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image": "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"

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 FLUX.1 [dev] with Controlnets and Loras · Rf Inversion

Edits the image at `image_url` according to a `prompt` using the RF-Inversion pipeline, which works from the original image rather than starting from noise. LoRAs, control LoRAs, ControlNets and a reference image can be added, and NAG settings (`nag_scale`, `nag_tau`, `nag_alpha`, `nag_end`) tune negative prompt steering.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
Prompt guiding edits to the image.
image_sizeoptional
Typeobject
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Dimensions of the generated image.
num_inference_stepsoptional
Typeinteger
Default28
1 – 50
Count of inference steps to run.
seedoptional
Typeinteger | null
Seed for reproducible images: an identical prompt and seed produce an identical image when the model version is unchanged.
lorasoptional
Typeobject[]
Default[]
LoRAs whose combined effect produces the generated image, with no limit on how many you supply.
loras[].pathrequired
Typestring
Location of the LoRA weights, specified as a URL or path.
loras[].scaleoptional
Typeobject | number
Default1
Scaling applied to LoRA weights before they are merged into the base model. Supply a dictionary of the form {"layer_name":layer_scale} to set individual layer scales; unspecified layers use 1.0.
control_lorasoptional
Typeobject[]
Default[]
Control-image LoRAs merged into a combined configuration for generating the final image; the number supplied is unrestricted.
control_loras[].pathrequired
Typestring
Location of the LoRA weights, specified as a URL or path.
control_loras[].scaleoptional
Typeobject | number
Default1
Scaling applied to LoRA weights before they are merged into the base model. Supply a dictionary of the form {"layer_name":layer_scale} to set individual layer scales; unspecified layers use 1.0.
control_loras[].control_image_urlrequired
Typeurl · image
Image URL supplying the control image.
control_loras[].preprocessoptional
Typeenum
DefaultNone
cannydepthNone
Preprocessing method applied to the supplied image.
controlnetsoptional
Typeobject[]
Default[]
ControlNet configuration for image generation, currently limited to a single ControlNet.
controlnets[].pathrequired
Typestring
ControlNet weight location, specified as a URL or path.
controlnets[].config_urloptional
Typestring | null
Optional URL pointing to the ControlNet's config.json file.
controlnets[].variantoptional
Typestring | null
Optional variant for use with a Hugging Face repository key.
controlnets[].control_image_urlrequired
Typeurl · image
Image URL supplying the control image.
controlnets[].mask_image_urloptional
Typeurl · image
Mask URL associated with the control image.
controlnets[].mask_thresholdoptional
Typenumber
Default0.5
0.01 – 0.99
Mask threshold value.
controlnets[].conditioning_scaleoptional
Typenumber
Default1
0 – 2
Scaling applied to ControlNet weights before they are merged into the base model.
controlnets[].start_percentageoptional
Typenumber
Default0
0 – 1
Percentage of total timesteps at which ControlNet starts influencing image generation.
controlnets[].end_percentageoptional
Typenumber
Default1
0 – 1
Percentage of total timesteps at which ControlNet stops influencing image generation.
controlnet_unionsoptional
Typeobject[]
Default[]
ControlNet union configuration for image generation, subject to the current single-ControlNet restriction.
controlnet_unions[].pathrequired
Typestring
ControlNet weight location, specified as a URL or path.
controlnet_unions[].config_urloptional
Typestring | null
Optional URL pointing to the ControlNet's config.json file.
controlnet_unions[].variantoptional
Typestring | null
Optional variant for use with a Hugging Face repository key.
controlnet_unions[].controlsrequired
Typeobject[]
Control images and associated modes supplied to the ControlNet.
controlnet_unions[].controls[].control_image_urlrequired
Typeurl · image
Image URL supplying the control image.
controlnet_unions[].controls[].mask_image_urloptional
Typeurl · image
Mask URL associated with the control image.
controlnet_unions[].controls[].control_moderequired
Typeenum
cannytiledepthblurposegraylow-quality
Control mode used by Flux Controlnet Union. Options: canny guides generation with edges; tile guides it with tiles; depth guides it with a grayscale depth map; blur blurs the image; pose guides generation with the image's pose; gray makes the image grayscale; low-quality produces a low-quality version of the image.
controlnet_unions[].controls[].conditioning_scaleoptional
Typenumber
Default1
0 – 2
Scaling applied to ControlNet weights before they are merged into the base model.
controlnet_unions[].controls[].mask_thresholdoptional
Typenumber
Default0.5
0.01 – 0.99
Mask threshold value.
controlnet_unions[].controls[].start_percentageoptional
Typenumber
Default0
0 – 1
Percentage of total timesteps at which ControlNet starts influencing image generation.
controlnet_unions[].controls[].end_percentageoptional
Typenumber
Default1
0 – 1
Percentage of total timesteps at which ControlNet stops influencing image generation.
easycontrolsoptional
Typeobject[]
Default[]
EasyControl inputs applied during image generation.
easycontrols[].control_method_urlrequired
Typestring
Control method's safetensor weight URL, or a supported identifier: `canny`, `depth`, `hedsketch`, `inpainting`, `pose`, `seg`, `subject`, `ghibli`.
easycontrols[].scaleoptional
Typenumber
Default1
0 – 2
Control method scaling factor.
easycontrols[].image_urlrequired
Typeurl · image
Image URL supplying a control input.
easycontrols[].image_control_typerequired
Typeenum
subjectspatial
Image control mode; accepts either `spatial` or `subject`.
fill_imageoptional
Typeobject
Input image that guides generation and can supply content for masked regions.
fill_image.fill_image_urloptional
Typeurl · image
Default[]
Image URLs for filling via redux prompting.
guidance_scaleoptional
Typenumber
Default3.5
0 – 20
Prompt-adherence strength for image selection, expressed as CFG (Classifier Free Guidance).
use_cfg_zerooptional
Typeboolean
Defaultfalse
Enables CFG-zero initialization sampling, described at https://arxiv.org/abs/2503.18886.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 10
Set how many images to generate; this choice is fixed at 1 when output is streamed.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Safety checking, which returns black images in place of any images flagged unsafe. A value of true enables checking; false disables it only for authorized accounts, while requests without authorization are checked regardless.
reference_image_urloptional
Typeurl · image
Image URL used for Reference-Only guidance.
reference_strengthoptional
Typenumber
Default0.65
-3 – 3
Reference-image influence during reference_only generation; without a supplied reference image, this strength setting has no effect.
reference_startoptional
Typenumber
Default0
0 – 1
Reference guidance start point, expressed as a percentage of all timesteps.
reference_endoptional
Typenumber
Default1
0 – 1
Reference guidance end point, expressed as a percentage of all timesteps.
base_shiftoptional
Typenumber
Default0.5
0.01 – 5
Baseline shift applied to scheduled timesteps.
max_shiftoptional
Typenumber
Default1.15
0.01 – 5
Maximum shift applied to scheduled timesteps.
output_formatoptional
Typeenum
Defaultpng
jpegpng
File format for the resulting image.
use_beta_scheduleoptional
Typeboolean
Defaultfalse
Controls whether to use beta sigmas.
sigma_scheduleoptional
Typestring | null
Sigma schedule used during denoising.
scheduleroptional
Typeenum
Defaulteuler
eulerdpmpp_2m
Scheduler used during denoising.
negative_promptoptional
Typestring
Default
Negative prompt processed with NAG by default to discourage the specified unwanted features in generated images.
nag_scaleoptional
Typenumber
Default3
≤ 10> 1
Negative-prompt avoidance controlled by the NAG scale: increasing it makes the generated image less like the negative description.
nag_tauoptional
Typenumber
Default2.5
> 0
NAG tau setting for hidden-state normalization; leaving it unchanged is recommended. Raising it weakens normalization and risks unexpected departures from the original image.
nag_alphaoptional
Typenumber
Default0.25
≤ 1> 0
NAG alpha sets how much the positive prompt redirects normalized guidance combining the positive and negative prompts. This final weighting gives the positive prompt more influence at lower settings and reduces redirection at higher settings.
nag_endoptional
Typenumber
Default0.25
≤ 1> 0
NAG cutoff expressed as a proportion of the generation steps. FLUX's original attention processors take over after NAG has run for that initial proportion.
image_urlrequired image
Typeurl · image
Image URL identifying the editing input.
controller_guidance_forwardoptional
Typenumber
Default0.6
0.01 – 3
Controller guidance (gamma) for generating structured noise.
controller_guidance_reverseoptional
Typenumber
Default0.75
0.01 – 3
Set eta, the denoising controller's guidance value; an image more similar to the input is obtained with settings nearer 1.
reverse_guidance_startoptional
Typeinteger
Default0
Starting timestep for guidance in the reverse process.
reverse_guidance_endoptional
Typeinteger
Default8
Ending timestep for guidance in the reverse process.
reverse_guidance_scheduleoptional
Typeenum
Defaultconstant
constantlinear_increaselinear_decrease
Schedule controlling the application of reverse guidance.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-general/rf-inversion",
  "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": 25,
    "usd": "0.025",
    "charged": 25,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_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"
  }
}
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
images
array of object {url, width, height, content_type}File information for the generated images.
timings
object
seed
integerImage-generation seed, including the randomly chosen value if the input omitted a seed; otherwise, it repeats the supplied value.
has_nsfw_concepts
array of booleanIndicates whether NSFW concepts appear in the generated images.
prompt
stringPrompt used during image generation.

More models: Image Editing

For AI agents: this page as Markdown is at https://doitong.com/en-GB/developers/models/flux-general/rf-inversion.md. All models and guides: https://doitong.com/developers/llms.txt