falText to imageComing soon

fal-ai/fooocus/inpaint

fal-ai/fooocus/inpaint is a text to image tool from fal that runs in the background and returns images. Coming soon: listed with its price, not yet open to runs.

This tool is listed but not yet available to run.

Price pending

Pricing

Price pending.

Limits

Runs
In the background
Returns
image
Longest queue wait
3600s
Run deadline
1800s
Largest inline input
1024 KB
Largest input file
500 MB
Largest output
4768 MB
Outputs per run
16

Input

FieldKindDefaultDescription
prompttextThe prompt to use for generating the image. Be as descriptive as possible for best results.
negative_prompttext The negative prompt to use. Use it to address details that you don't want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution).
styleslist["Fooocus Sharp","Fooocus V2","Fooocus Enhance"] The style to use.
performanceone of
Speed, Quality, Extreme Speed, Lightning
Extreme Speed You can choose Speed or Quality
guidance_scalenumber
1 to 30
4 The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
sharpnessnumber
0 to 30
2 The sharpness of the generated image. Use it to control how sharp the generated image should be. Higher value means image and texture are sharper.
aspect_ratiotext1024x1024 The size of the generated image. You can choose between some presets or custom height and width that **must be multiples of 8**.
num_imagesnumber (whole)
1 to 4
1 Number of images to generate in one request
lorasJSON[{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}] The LoRAs to use for the image generation. You can use up to 5 LoRAs and they will be merged together to generate the final image.
refiner_modelone of
None, realisticVisionV60B1_v51VAE.safetensors
NoneRefiner (SDXL or SD 1.5)
refiner_switchnumber
0 to 1
0.8 Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models 0.8 for XL-refiners; or any value for switching two SDXL models.
output_formatone of
png, jpeg, webp
jpegThe format of the generated image.
seednumber (whole)— The same seed and the same prompt given to the same version of Stable Diffusion will output the same image every time.
inpaint_image_url requiredtext—The image to use as a reference for inpainting.
mask_image_urltext—The image to use as a mask for the generated image.
inpaint_modeone of
Inpaint or Outpaint (default), Improve Detail (face, hand, eyes, etc.), Modify Content (add objects, change background, etc.)
Inpaint or Outpaint (default)The mode to use for inpainting.
inpaint_additional_prompttextDescribe what you want to inpaint.
outpaint_selectionslist[]The directions to outpaint.
override_inpaint_optionstrue or falsefalse If set to true, the advanced inpaint options ('inpaint_disable_initial_latent', 'inpaint_engine', 'inpaint_strength', 'inpaint_respective_field', 'inpaint_erode_or_dilate') will be overridden. Otherwise, the default values will be used.
inpaint_disable_initial_latenttrue or falsefalseIf set to true, the initial preprocessing will be disabled.
inpaint_engineone of
None, v1, v2.5, v2.6
v2.6Version of Fooocus inpaint model
inpaint_strengthnumber
… to 1
1 Same as the denoising strength in A1111 inpaint. Only used in inpaint, not used in outpaint. (Outpaint always use 1.0)
inpaint_respective_fieldnumber
0 to 1
0.618 The area to inpaint. Value 0 is same as "Only Masked" in A1111. Value 1 is same as "Whole Image" in A1111. Only used in inpaint, not used in outpaint. (Outpaint always use 1.0)
inpaint_erode_or_dilatenumber
-64 to 64
0 Positive value will make white area in the mask larger, negative value will make white area smaller. (default is 0, always process before any mask invert)
invert_masktrue or falsefalseIf set to true, the mask will be inverted.
image_prompt_1JSON—
image_prompt_2JSON—
image_prompt_3JSON—
image_prompt_4JSON—
mixing_image_prompt_and_inpainttrue or falsefalseMixing Image Prompt and Inpaint

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "fal-ai/fooocus/inpaint",
    "input": {
      "inpaint_image_url": "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
    }
  }'