- CV任务状态码信息附录
- 绘图信息
- 绘图任务
- 模型训练
- 绘图工具
- 图片检测
- 视频工具
- 音频工具
- 翻译
sd 图生图-v2
POST
/AIGCImgOpenServ/saas/sd/v2/image2image
img
请求参数
Header 参数
X-Request-req-accessKeyId
string
必需
示例值:
accessKeyId
X-Request-req-accessKeySecret
string
必需
示例值:
accessKeySecret
Body 参数application/json
n_iter
integer
生成的批次
batch_size
integer
每批次生成数量
steps
integer
迭代步数
hr_scale
integer
高清修复倍数
negative_prompt
string
负向描述词
denoising_strength
number
重绘幅度
width
integer
图片宽度
height
integer
图片高度
hr_upscaler
string
要使用的放大器
alwayson_scripts
object
外部传入参数
override_settings
object
外部传入参数
sd_model_checkpoint
string
模型编码,需要带着
sd_vae
string
变分自动编码器
output_image_format
string
输出图片格式
id_task
string
任务id
ADetailer
object
adetailer插件
image_link
string
用户上传的图片的 url 链接
mask_link
string
用户上传涂抹后的 url 链接
prompt
string
正向描述词
enable_hr
boolean
高清修复
seed
string
随机种子
restore_faces
boolean
脸部修复
cfg_scale
integer
可选
sampler_index
string
采样方式
hr_second_pass_steps
integer
高清修复的后面步骤
hr_resize_x
integer
高清修复后的高度
hr_resize_y
integer
高清修复后的宽度
resize_mode
integer
resize模式
mask_blur
integer
蒙版模糊系数
mask_blur_x
integer
横向蒙版模糊系数
mask_blur_y
integer
纵向蒙版模糊系数
inpainting_fill
integer
蒙版覆盖内容
inpaint_full_res
boolean
重绘区域
inpaint_full_res_padding
integer
边缘预留像素
inpainting_mask_invert
integer
蒙版模式
initial_noise_multiplier
number
噪声乘法器
image_cfg_scale
number
可选
示例
{
"prompt": "{best quality}, {{masterpiece}}, {highres}, original, extremely detailed,incredibly_absurdres,intricate detail,(detailed face),(face:1.2),1girl , kneeling down, from below , crying, sitting, ghost",
"n_iter": 1,
"steps": 25,
"seed": "1221212",
"restore_faces": false,
"enable_hr": false,
"hr_scale": 2,
"width": 768,
"height": 768,
"negative_prompt": "(nsfw:1.5),(nude:1.3), (child Pornography:1.2),molestation,incest,rape,about to be raped,(sex:1.3),uncensored,EasyNegative,(worst quality, low quality:1.4), (((distorted hands))),((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((b&w)), (((duplicate))), ((morbid)), ((mutilated)),poorly drawn face, out of frame, mutation, mutated, (text), signature, monster,watermark,extra fingers,fewer fingers, Wrong hands,wrong fingers,fingers crossed,styled fingers,fingers missed,missed fingers,cheese fingers, chocolate fingers,fingers on fingers,closed fist, fighting fist,fist ,hands with fist,many fists,only hands with wrong fists,fingers crossed,\r\n,",
"cfg_scale": 27,
"sampler_index": "DPM++ 2M Karras",
"hr_second_pass_steps": 20,
"hr_resize_x": 1024,
"hr_resize_y": 1024,
"denoising_strength": 0.55,
"alwayson_scripts": {
"sd_model_checkpoint": "revAnimated_v122_7371.safetensors",
"image_link": "https://paintcdn.glutinoust.com/uploads/20230610/62491f852782a40aebd13f8838f79c69.png",
"id_task": "pro1686666",
"sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
"override_settings": {
"CLIP_stop_at_last_layers": 2
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zhiqite.com/AIGCImgOpenServ/saas/sd/v2/image2image' \
--header 'X-Request-req-accessKeyId: accessKeyId' \
--header 'X-Request-req-accessKeySecret: accessKeySecret' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "{best quality}, {{masterpiece}}, {highres}, original, extremely detailed,incredibly_absurdres,intricate detail,(detailed face),(face:1.2),1girl , kneeling down, from below , crying, sitting, ghost",
"n_iter": 1,
"steps": 25,
"seed": "1221212",
"restore_faces": false,
"enable_hr": false,
"hr_scale": 2,
"width": 768,
"height": 768,
"negative_prompt": "(nsfw:1.5),(nude:1.3), (child Pornography:1.2),molestation,incest,rape,about to be raped,(sex:1.3),uncensored,EasyNegative,(worst quality, low quality:1.4), (((distorted hands))),((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((b&w)), (((duplicate))), ((morbid)), ((mutilated)),poorly drawn face, out of frame, mutation, mutated, (text), signature, monster,watermark,extra fingers,fewer fingers, Wrong hands,wrong fingers,fingers crossed,styled fingers,fingers missed,missed fingers,cheese fingers, chocolate fingers,fingers on fingers,closed fist, fighting fist,fist ,hands with fist,many fists,only hands with wrong fists,fingers crossed,\r\n,",
"cfg_scale": 27,
"sampler_index": "DPM++ 2M Karras",
"hr_second_pass_steps": 20,
"hr_resize_x": 1024,
"hr_resize_y": 1024,
"denoising_strength": 0.55,
"alwayson_scripts": {
"sd_model_checkpoint": "revAnimated_v122_7371.safetensors",
"image_link": "https://paintcdn.glutinoust.com/uploads/20230610/62491f852782a40aebd13f8838f79c69.png",
"id_task": "pro1686666",
"sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
"override_settings": {
"CLIP_stop_at_last_layers": 2
}
}
}'
返回响应
🟢200成功
application/json
Body
code
string
返回状态码
msg
string
返回状态信息
data
object
必需
task_id
string
业务id
示例
{
"code": "200",
"msg": "success",
"data": {
"task_id": "pro1686666"
}
}
修改于 2024-10-18 01:41:22