curl --location --request POST 'http://dev-cn.your-api-server.comv1/generation/stable-diffusion-v1-6/image-to-image?Accept &Organization =org-123456&Stability-Client-ID =my-great-plugin&Stability-Client-Version =1.2.1' \
--form 'text_prompts=""' \
--form 'init_image=""' \
--form 'init_image_mode=""' \
--form 'image_strength=""' \
--form 'cfg_scale=""' \
--form 'clip_guidance_preset=""' \
--form 'sampler=""' \
--form 'samples=""' \
--form 'seed=""' \
--form 'steps=""' \
--form 'style_preset=""' \
--form 'extras=""'
{
"artifacts": [
[
{
"base64": "string",
"finishReason": "string",
"seed": 0
}
]
]
}
multipart/form-data
请求中的表示方式,提示必须遵循格式text_prompts[index][text|weight]
,其中index
一些整数用于将文本和权重联系在一起。虽然index
不必是连续的,但重复的条目将覆盖以前的条目,因此建议使用顺序索引。A lighthouse on a cliff
和权重为0.5
,它将表示为:text_prompts[0][text]: "A lighthouse on a cliff"
text_prompts[0][weight]: 0.5
index
:text_prompts[0][text]: "A lighthouse on a cliff"
text_prompts[0][weight]: 0.5
text_prompts[1][text]: "land, ground, dirt, grass"
text_prompts[1][weight]: -0.9
image_strength
或控制对结果的step_schedule_*
影响程度。init_image
init_image
对扩散过程的影响有多大。接近 的值1
将生成与 非常相似的图像init_image
,而接近 的值0
将生成与 非常不同的图像init_image
。其行为旨在反映 DreamStudio 的“图像强度”滑块。step_schedule_start
,通过计算完成1 - image_strength
。例如,传递 35% 的图像强度 ( 0.35
) 将导致step_schedule_start
的0.65
。