使用 lcm 进行图像到图像
开发环境
开发环境
POST
/v3/lcm-img2img
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v3/lcm-img2img' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_name": "dreamshaper_8_93211.safetensors",
"input_image": "{{base64 encoded image}}",
"prompt": "1girl",
"negative_prompt": "",
"image_num": 1,
"sd_vae": "vae-ft-mse-840000-ema-pruned.safetensors",
"loras": [
{
"model_name": "more_details_59655",
"strenth": "0.5"
},
{
"model_name": "Gothpunk_30978",
"strenth": 0.5
}
],
"embeddings": [
{
"model_name": "AS-YoungV2"
},
{
"model_name": "MidAged"
}
],
"steps": 4,
"guidance_scale": 0,
"seed": 123,
"clip_skip": 1
}'
响应示例响应示例
[
[
{
"image_url": "",
"image expire time": null,
"image_type": ""
}
],
[
{
"image_url": "https://faas-output-image.s3.ap-southeast-1.amazonaws.com/test/lcm_img2img_e1ca4ee4-aa69-4073-94ab-f2dddc6bf7fc_0.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIASVPYCN6LRCW3SOUV%2F20231201%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20231201T081801Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=4d9d50cf00116cea5409acbef51caaf023f805804be3f13efcb980982a2b4d46",
"image_url_ttl": "3600",
"image_type": "jpeg"
},
{
"image_url": "https://faas-output-image.s3.ap-southeast-1.amazonaws.com/test/lcm_img2img_e1ca4ee4-aa69-4073-94ab-f2dddc6bf7fc_0.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIASVPYCN6LRCW3SOUV%2F20231201%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20231201T081801Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=4d9d50cf00116cea5409acbef51caaf023f805804be3f13efcb980982a2b4d46",
"image_url_ttl": "3600",
"image_type": "jpeg"
}
]
]
请求参数
Header 参数
Authorization
string
必需
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返回响应
修改于 2024-02-05 08:40:34