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 pendingPricing
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
| Field | Kind | Default | Description |
|---|---|---|---|
prompt | text | The prompt to use for generating the image. Be as descriptive as possible for best results. | |
negative_prompt | text | 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). | |
styles | list | ["Fooocus Sharp","Fooocus V2","Fooocus Enhance"] | The style to use. |
performance | one of Speed, Quality, Extreme Speed, Lightning | Extreme Speed | You can choose Speed or Quality |
guidance_scale | number 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. |
sharpness | number 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_ratio | text | 1024x1024 | The size of the generated image. You can choose between some presets or custom height and width that **must be multiples of 8**. |
num_images | number (whole) 1 to 4 | 1 | Number of images to generate in one request |
loras | JSON | [{"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_model | one of None, realisticVisionV60B1_v51VAE.safetensors | None | Refiner (SDXL or SD 1.5) |
refiner_switch | number 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_format | one of png, jpeg, webp | jpeg | The format of the generated image. |
seed | number (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 required | text | — | The image to use as a reference for inpainting. |
mask_image_url | text | — | The image to use as a mask for the generated image. |
inpaint_mode | one 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_prompt | text | Describe what you want to inpaint. | |
outpaint_selections | list | [] | The directions to outpaint. |
override_inpaint_options | true or false | false | 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_latent | true or false | false | If set to true, the initial preprocessing will be disabled. |
inpaint_engine | one of None, v1, v2.5, v2.6 | v2.6 | Version of Fooocus inpaint model |
inpaint_strength | number … 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_field | number 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_dilate | number -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_mask | true or false | false | If set to true, the mask will be inverted. |
image_prompt_1 | JSON | — | |
image_prompt_2 | JSON | — | |
image_prompt_3 | JSON | — | |
image_prompt_4 | JSON | — | |
mixing_image_prompt_and_inpaint | true or false | false | Mixing 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"
}
}'