Adetailer

POST

Detail the given image.

Request

This endpoint expects an object.
detectorenumRequired

Detection model to use. Configures whether e.g. faces or hands or people are targeted for after-detailing.

cfg_scaledoubleOptionalDefaults to 7.5

Floating-point number represeting how closely to adhere to prompt description. Must be a positive number no greater than 50.0.

checkpointstringOptional

Name of a checkpoint to use for inpainting.

confidencedoubleOptionalDefaults to 0.3

Inpainted areas are determined using a detector. This setting adjusts the sensitivity of the detector (lower considers more image fragments for inpainting).

image_encoding"jpeg" or "png"Optional
Allowed values: jpegpng

Define which encoding process should be applied before returning the modified image.

init_imagestringOptional

base64-encoded image to modify. Resolution must be supported by inpainting_base_model: sdxl: 640x1536, 768x1344, 832x1216, 896x1152, 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 1664x2432, 2048x2048, 2432x1664; sd15: 384x704, 448x576, 512x512, 512x704, 512x768, 512x832, 576x448, 576x768, 576x768, 576x1024, 640x512, 640x640, 640x768, 704x384, 704x1216, 768x512, 768x576, 768x1024, 832x512, 896x896, 1024x576, 1024x768, 1024x1024, 1024x1536, 1216x704, 1536x1024.

init_image_urlstringOptional

If given, download init_image from this URL.

inpainting_base_model"sdxl" or "sd15"Optional
Allowed values: sdxlsd15

The base model to be used for inpainting. Typically should match the model used to generate init_image.

lorasmap from strings to optional doublesOptional

A dict mapping the name of a LoRA to apply to its weight.

mask_blurintegerOptionalDefaults to 4

A mask is created for each inpainted area in the image. After dilation (see mask_dilation parameter), the mask is blurred. This technique is typically used to smoothly blend the inpainted area with the original image. This option specifies the radius, in pixels, of the gaussian blur kernel. The higher the value, the wider the blur. Defaults to 4. Must be greater than or equal to 0 and recommended to be less than 64.

mask_dilationintegerOptionalDefaults to 4

A mask is created for each inpainted area in the image. Mask Dilation allows you to expand the size of the mask while maintaining its shape. This technique is typically used to reduce artifacts near borders in the mask. This parameter is the size, in pixels, of the dilation kernel to apply. Defaults to 4. Must be greater than or equal to 0 and recommended to be less than 64.

mask_paddingintegerOptionalDefaults to 32

Each inpainted area is passed to the image-to-image generator with some surrounding context. The contextual area is created by padding the area occupied by the blurred, dilated mask. This technique improves inpainting quality, and the contextual area is not modified. This parameter specifies the amount of padding, in pixels, to apply around the processed mask. When the computed padding goes off the edge of the image, the padded area is slid towards the center of the image. Must be greater than or equal to 0 and recommended to be less than 10% the size of an inpainting mask.

max_num_detectionsintegerOptional

Inpaint at most this many objects, starting with the most confident matches.

negative_promptstringOptional

Inpainting negative prompt.

promptstringOptional

Inpainting input prompt.

samplerenumOptional

Sampler used for inpainting.

seedinteger or list of optional integersOptional

Integer number or list of integers representing the seeds of random generators. Fixing random seed is useful when attempting to generate a specific image. Must be greater than 0 and less than 2^32.

stepsintegerOptionalDefaults to 20

Number of SDXL inference steps.

strengthdoubleOptionalDefaults to 0.9

Floating-point number indicating how creative the Image to Image generation mode should be. Must be greater than 0 and less than or equal to 1.0.

style_presetstringOptionalDefaults to base

Used to guide the SDXL inpainter towards a particular style.

transfer_imagesmap from strings to optional lists of stringsOptional

If given, a dict whose keys are strings containing the index of the face to modify (faces 0-indexed top-to-bottom, left-to-right; faces with 75% vertical overlap with the leftmost image in a row are counted in that row). Values are a list of base64 example faces which are together used to replace the indexed face.

union_masksbooleanOptional

When true, create a single mask by unioning the mask for each detected object together, then send a single inpainting request to the backing model.

use_refinerbooleanOptional

Whether to apply the SDXL refiner.

Response

This endpoint returns an object.
init_image_removed_for_safetyboolean

True when the init_image failed the safety checker, so no processing was done.

num_objects_detectedinteger

The number of objects that were successfully detected.

num_objects_inpaintedinteger

The number of objects that were successfully inpainted.

num_removed_for_safetyinteger

Number of inpainting requests that violated the OctoAI Terms of Service.

image_b64stringOptional

The modified image or None if it was removed for safety.