InstantID
Customizing realistic human photos via Stacked ID Embedding.
This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the image generation results.
Request Headers
Enum: application/json
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
Optional extra parameters for the request.
Name of the SDXL-based model. Retrieve the corresponding sd_name value by invoking the Query Model API with filter.types=checkpoint&filter.is_sdxl=true as the query parameter. Recommended model_name: sdxlUnstableDiffusers_v8HEAVENSWRATH_133813.safetensors.
Get asset ID with guidance from Get image assets ID.
Get asset ID with guidance from Get image assets ID.
Text input required to guide the image generation, divided by ,
. Range [1, 1024].
Width of image. Range [128, 2048].
Height of image. Range [128, 2048].
Number of images generated in a single request. Range [1, 4].
The number of denoising steps. More steps usually can produce higher quality images, but take more time to generate, Range [1, 100].
This setting says how close the Stable Diffusion will listen to your prompt, higer guidance forces the model to better follow the prompt, but result in lower quality output. Range [1, 30].
This parameter determines the denoising algorithm employed during the sampling phase of Stable Diffusion. Each option represents a distinct method by which the model incrementally generates new images. These algorithms differ significantly in their processing speed, output quality, and the specific characteristics of the images they generate, allowing users to tailor the image generation process to meet precise requirements. Get reference at A brief introduction to Sampler.
Enum: Euler a
, Euler
, LMS
, Heun
, DPM2
, DPM2 a
, DPM++ 2S a
, DPM++ 2M
, DPM++ SDE
, DPM fast
, DPM adaptive
, LMS Karras
, DPM2 Karras
, DPM2 a Karras
, DPM++ 2S a Karras
, DPM++ 2M Karras
, DPM++ SDE Karras
, DDIM
, PLMS
, UniPC
Text input that specifies what to exclude from the generated images, divided by ,
. Range [1, 1024].
ControlNet Units to use for InstantID.
A seed is a number from which Stable Diffusion generates noise, which, makes generation deterministic. Using the same seed and set of parameters will produce identical image each time, minimum -1. Defaults to -1.
IdentityNet strength ratio (for fidelity), where 0 represents minimal influence and 1.5 indicates maximum intensity. Range [0, 1.5].
Adapter strength ratio (for detail), where 0 represents the least detail enhancement and 1.5 ensures the highest level of detail. Range [0, 1.5].
LoRA is a fast and lightweight training method that inserts and trains a significantly smaller number of parameters instead of all the model parameters. Currently supports up to 5 LoRAs.
This parameter indicates the number of layers to stop from the bottom during optimization, so clip_skip on 2 would mean, that in SD1.x model where the CLIP has 12 layers, you would stop at 10th layer, Range [1, 12], get reference at A brief introduction to Clip Skip.
This optional parameter represents an image with keypoints. If provided, it will be used to enhance the face analysis process, and the size needs to match that of face_image_assets_ids. Get asset ID with guidance from Get image assets ID.
This parameter is a floating-point value that specifies the starting point of the process. It determines when the process should begin. Range [0, 1.0], default is 0.0.
This parameter is a floating-point value that specifies the ending point of the process. It determines when the process should end. Range [0, 1.0], default is 1.0.
Response
Use the task_id to request the Task Result API to retrieve the generated outputs.
Example
Customize realistic human photos via Stacked ID Embedding. The returned photos can be accessed via the API /v3/async/task-result
using the task_id
.
Please set the Content-Type
header to application/json
in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.
Get Image Assets ID
Request:
Response:
Python Request:
Response:
Request Instant-ID API
Use image assets id generated from step 20.1 to request API. Current only SDXL based model supported.
Below are the supported models, We recommend using the sdxlUnstableDiffusers_v8HEAVENSWRATH_133813.safetensors
model for better results:
Request:
Response:
Use task_id
to get images
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can get result in images
of response.
Request:
Response:
Was this page helpful?