LoRA
开发环境
开发环境
POST
https://stablediffusionapi.com/api/v4/dreambooth
笔记 您可以使用经过训练的模型或任何公共模型进行 API 调用,还可以传递 lora_model
ID 参数。**您可以在此处**找到可用的公共模型和 LoRA 模型及其 ID 的列表。
提示 您也可以使用多个Lora。只需确保将逗号分隔的 lora 模型 ID 传递给 请求正文中的 lora_model
as即可。"more_details,animie"
POST
向https://stablediffusionapi.com/api/v4/dreambooth 接口发出请求,并在请求正文中传递所需的参数。多语言支持
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stablediffusionapi.com/api/v4/dreambooth' \
--header 'Content-Type: application/json' \
--data-raw '"key": "",
"model_id": "your_model_id",
"prompt": "actual 8K portrait photo of gareth person, portrait, happy colors, bright eyes, clear eyes, warm smile, smooth soft skin, big dreamy eyes, beautiful intricate colored hair, symmetrical, anime wide eyes, soft lighting, detailed face, by makoto shinkai, stanley artgerm lau, wlop, rossdraws, concept art, digital painting, looking into camera",
"negative_prompt": "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime",
"width": "512",
"height": "512",
"samples": "1",
"num_inference_steps": "30",
"safety_checker": "no",
"enhance_prompt": "yes",
"seed": null,
"guidance_scale": 7.5,
"multi_lingual": "no",
"panorama": "no",
"self_attention": "no",
"upscale": "no",
"embeddings_model": null,
"lora_model": null,
"scheduler": "UniPCMultistepScheduler",
"webhook": null,
"track_id": null
}'
响应示例响应示例
{
"status": "string",
"generationTime": 0,
"id": 0,
"output": [
"string"
],
"meta": {
"prompt": "string",
"model_id": "string",
"negative_prompt": "string",
"scheduler": "string",
"safetychecker": "string",
"W": 0,
"H": 0,
"guidance_scale": 0,
"seed": 0,
"steps": 0,
"n_samples": 0,
"full_url": "string",
"upscale": "string",
"multi_lingual": "string",
"panorama": "string",
"self_attention": "string",
"embeddings": null,
"lora": null,
"outdir": "string",
"file_prefix": "string"
}
}
请求参数
Body 参数application/json
返回响应
修改于 2023-10-30 05:59:11