- 🦊一分钟,了解StableDiffusion WebUI 和 ComfyUI !
- Stable Diffusion WebUI
- ComfyUI
/prompt
POST
http://192.168.3.25:8188/prompt
请求参数
Body 参数application/json
client_id
string
必需
prompt
object
必需
示例
{
"client_id": "533ef3a3-39c0-4e39-9ced-37d290f371f8",
"prompt": {
"3": {
"inputs": {
"seed": 0,
"steps": 20,
"cfg": 2.5,
"sampler_name": "euler",
"scheduler": "karras",
"denoise": 1,
"model": [
"14",
0
],
"positive": [
"12",
0
],
"negative": [
"12",
1
],
"latent_image": [
"12",
2
]
},
"class_type": "KSampler",
"_meta": {
"title": "K采样器"
}
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"15",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE解码"
}
},
"12": {
"inputs": {
"width": 1024,
"height": 576,
"video_frames": 14,
"motion_bucket_id": 32,
"fps": 6,
"augmentation_level": 0,
"clip_vision": [
"15",
1
],
"init_image": [
"23",
0
],
"vae": [
"15",
2
]
},
"class_type": "SVD_img2vid_Conditioning",
"_meta": {
"title": "SVD_图像到视频_条件"
}
},
"14": {
"inputs": {
"min_cfg": 1,
"model": [
"15",
0
]
},
"class_type": "VideoLinearCFGGuidance",
"_meta": {
"title": "线性CFG引导"
}
},
"15": {
"inputs": {
"ckpt_name": "svd_xt_1_1.safetensors"
},
"class_type": "ImageOnlyCheckpointLoader",
"_meta": {
"title": "Checkpoint加载器(仅图像)"
}
},
"23": {
"inputs": {
"image": "C:\\Users\\dourungeng\\Pictures\\elephant1.png [input]",
"upload": "image"
},
"class_type": "LoadImage",
"_meta": {
"title": "加载图像"
}
},
"24": {
"inputs": {
"frame_rate": 6,
"loop_count": 0,
"filename_prefix": "SVD_img2vid",
"format": "image/gif",
"pingpong": false,
"save_output": true,
"images": [
"8",
0
]
},
"class_type": "VHS_VideoCombine",
"_meta": {
"title": "合并为视频"
}
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://192.168.3.25:8188/prompt' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": "533ef3a3-39c0-4e39-9ced-37d290f371f8",
"prompt": {
"3": {
"inputs": {
"seed": 0,
"steps": 20,
"cfg": 2.5,
"sampler_name": "euler",
"scheduler": "karras",
"denoise": 1,
"model": [
"14",
0
],
"positive": [
"12",
0
],
"negative": [
"12",
1
],
"latent_image": [
"12",
2
]
},
"class_type": "KSampler",
"_meta": {
"title": "K采样器"
}
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"15",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE解码"
}
},
"12": {
"inputs": {
"width": 1024,
"height": 576,
"video_frames": 14,
"motion_bucket_id": 32,
"fps": 6,
"augmentation_level": 0,
"clip_vision": [
"15",
1
],
"init_image": [
"23",
0
],
"vae": [
"15",
2
]
},
"class_type": "SVD_img2vid_Conditioning",
"_meta": {
"title": "SVD_图像到视频_条件"
}
},
"14": {
"inputs": {
"min_cfg": 1,
"model": [
"15",
0
]
},
"class_type": "VideoLinearCFGGuidance",
"_meta": {
"title": "线性CFG引导"
}
},
"15": {
"inputs": {
"ckpt_name": "svd_xt_1_1.safetensors"
},
"class_type": "ImageOnlyCheckpointLoader",
"_meta": {
"title": "Checkpoint加载器(仅图像)"
}
},
"23": {
"inputs": {
"image": "C:\\Users\\dourungeng\\Pictures\\elephant1.png [input]",
"upload": "image"
},
"class_type": "LoadImage",
"_meta": {
"title": "加载图像"
}
},
"24": {
"inputs": {
"frame_rate": 6,
"loop_count": 0,
"filename_prefix": "SVD_img2vid",
"format": "image/gif",
"pingpong": false,
"save_output": true,
"images": [
"8",
0
]
},
"class_type": "VHS_VideoCombine",
"_meta": {
"title": "合并为视频"
}
}
}
}'
返回响应
🟢200成功
application/json
Body
prompt_id
string
必需
number
integer
必需
node_errors
object
必需
示例
{
"prompt_id": "3604be44-eb6b-4d54-b82d-62d31a6c0b36",
"number": 8,
"node_errors": {}
}
修改于 2024-07-08 12:14:20