【ComfyUI的API接口调用示例】


ComfyUI的API接口调用示例


本文目的

本文调用接口示例主要指导需要调用ComfyUI的开发者如何调用ComfyUI官方的API接口提交任务、查询历史、获取绘画视频结果等。

阅读本文的前提是你本地已经安装了ComfyUI,并且对工作流绘画和生成视频已经有所了解。注意如图右边栏目保存API格式的工作流。
在这里插入图片描述

ComfyUI的测试地址

本地comfyui测试地址:http://127.0.0.1:8188

POST /upload/mask

POST /upload/mask

上传蒙版图片接口,一般用于局部重绘

Body 请求参数

image: file://C:\Users\dourungeng\Pictures\640.png
type: input
subfolder: clipspace
original_ref: "{“filename”:”640.png”,”type”:”input”,”subfolder”:”clipspace”}"

请求参数

名称位置类型必选说明
bodybodyobjectnone
» imagebodystring(binary)图片将以二进制格式发送到服务器
» typebodystring上传图片的目标文件夹
» subfolderbodystring上传图片的目标子文件夹
» original_refbodystringnone

返回成功示例

{
  "name": "640.png",
  "subfolder": "clipspace",
  "type": "input"
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» namestringtruenonenone
» subfolderstringtruenonenone
» typestringtruenonenone

POST /upload/image

POST /upload/image

上传图片接口

Body 请求参数

image: string

请求参数

名称位置类型必选说明
bodybodyobjectnone
» imagebodystring(binary)图片将以二进制格式发送到服务器

返回成功示例

{
  "name": "0e9f-hiixpup5792613.jpg",
  "subfolder": "",
  "type": "input"
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» namestringtruenonenone
» subfolderstringtruenonenone
» typestringtruenonenone

POST /prompt

POST /prompt

绘图任务的下发接口,此接口只做任务下发,返回任务ID信息。

Body 请求参数

{
  "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": "合并为视频"
      }
    }
  }
}

请求参数

名称位置类型必选说明
bodybodyobjectnone
» client_idbodystringnone
» promptbodyobjectnone

返回成功示例

{
  "prompt_id": "3604be44-eb6b-4d54-b82d-62d31a6c0b36",
  "number": 8,
  "node_errors": {}
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» prompt_idstringtruenonenone
» numberintegertruenonenone
» node_errorsobjecttruenonenone

GET /prompt

GET /prompt

获取服务器当前剩余任务列队的数量

返回成功示例

{
  "exec_info": {
    "queue_remaining": 0
  }
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» exec_infoobjecttruenonenone
»» queue_remainingintegertruenonenone

GET /view

GET /view

图片的在线预览接口(上传图像,生图图像,蒙蔽图像,均通过该接口预览)

请求参数

名称位置类型必选说明
filenamequerystring图片名称
typequerystring图片存放位置的文件夹(input为长传图片,output为生成的图片)
subfolderquerystring子文件夹(没有可不填)
previewquerystring预览
channelquerystringnone

返回示例

成功

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET /queue

GET /queue

获取任务队列数量

返回示例

成功

{
  "queue_running": [],
  "queue_pending": []
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» queue_running[string]truenonenone
» queue_pending[string]truenonenone

POST /queue

POST /queue

清除列队/无返回信息则为成功

Body 请求参数

{
  "clear": true
}

请求参数

名称位置类型必选说明
bodybodyobjectnone

返回示例

200 Response

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST /interrupt

POST /interrupt

取消当前任务/不需任何参数

返回示例

200 Response

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET /history/{prompt_id}

GET /history/39d61fa4-58a4-4f61-a547-caab0f4c3a53

获取历史任务数据(根据任务prompt_id获取历史数据)

返回成功示例

{
  "39d61fa4-58a4-4f61-a547-caab0f4c3a53": {
    "prompt": [
      10,
      "39d61fa4-58a4-4f61-a547-caab0f4c3a53",
      {
        "3": {
          "inputs": {
            "seed": 687973405480854,
            "steps": 30,
            "cfg": 8,
            "sampler_name": "dpmpp_2m",
            "scheduler": "karras",
            "denoise": 1,
            "model": [
              "4",
              0
            ],
            "positive": [
              "6",
              0
            ],
            "negative": [
              "7",
              0
            ],
            "latent_image": [
              "5",
              0
            ]
          },
          "class_type": "KSampler",
          "_meta": {
            "title": "K采样器"
          }
        },
        "4": {
          "inputs": {
            "ckpt_name": "sdxl-动漫二次元_2.0.safetensors"
          },
          "class_type": "CheckpointLoaderSimple",
          "_meta": {
            "title": "Checkpoint加载器(简易)"
          }
        },
        "5": {
          "inputs": {
            "width": 512,
            "height": 512,
            "batch_size": 1
          },
          "class_type": "EmptyLatentImage",
          "_meta": {
            "title": "空Latent"
          }
        },
        "6": {
          "inputs": {
            "text": "1girl,flower,outdoors,solo,dress,long hair,closed eyes,sky,holding,smile,cloud,open mouth,field,blush,day,blue sky,white flower,holding flower,flower field,short sleeves,teeth,blue dress,petals,:d,facing viewer,grey hair,floating hair,wind,happy,^_^,daisy,upper teeth only,white dress,",
            "clip": [
              "4",
              1
            ]
          },
          "class_type": "CLIPTextEncode",
          "_meta": {
            "title": "CLIP文本编码器"
          }
        },
        "7": {
          "inputs": {
            "text": "(worst quality, low quality),deformed,distorted,disfigured,doll,poorly drawn,bad anatomy,wrong anatomy,",
            "clip": [
              "4",
              1
            ]
          },
          "class_type": "CLIPTextEncode",
          "_meta": {
            "title": "CLIP文本编码器"
          }
        },
        "8": {
          "inputs": {
            "samples": [
              "3",
              0
            ],
            "vae": [
              "4",
              2
            ]
          },
          "class_type": "VAEDecode",
          "_meta": {
            "title": "VAE解码"
          }
        },
        "9": {
          "inputs": {
            "filename_prefix": "ComfyUI",
            "images": [
              "8",
              0
            ]
          },
          "class_type": "SaveImage",
          "_meta": {
            "title": "保存图像"
          }
        }
      },
      {
        "client_id": "533ef3a3-39c0-4e39-9ced-37d290f371f8"
      },
      [
        "9"
      ]
    ],
    "outputs": {
      "9": {
        "images": [
          {
            "filename": "ComfyUI_00138_.png",
            "subfolder": "",
            "type": "output"
          }
        ]
      }
    },
    "status": {
      "status_str": "success",
      "completed": true,
      "messages": [
        [
          "execution_start",
          {
            "prompt_id": "39d61fa4-58a4-4f61-a547-caab0f4c3a53"
          }
        ],
        [
          "execution_cached",
          {
            "nodes": [],
            "prompt_id": "39d61fa4-58a4-4f61-a547-caab0f4c3a53"
          }
        ]
      ]
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» 39d61fa4-58a4-4f61-a547-caab0f4c3a53objecttruenone下发任务prompt_id
»» prompt[object]truenone下发任务的api工作流的原始提交参数
»» outputs[object]truenone输出的结果
»» status[object]truenone任务状态

GET /history

GET /history

获取历史任务列表

返回成功示例

{
    "d40751e8-3e96-472f-a818-90d36d06faf1": {
        "prompt": [
            0,
            "d40751e8-3e96-472f-a818-90d36d06faf1", {
                "3": {
                    "inputs": {
                        "seed": 0,
                        "steps": 30,
                        "cfg": 8,
                        "sampler_name": "dpmpp_2m",
                        "scheduler": "karras",
                        "denoise": 1,
                        "model": [
                            "4",
                            0
                        ],
                        "positive": [
                            "6",
                            0
                        ],
                        "negative": [
                            "7",
                            0
                        ],
                        "latent_image": [
                            "5",
                            0
                        ]
                    },
                    "class_type": "KSampler",
                    "_meta": {
                        "title": "K采样器"
                    }
                },
                "4": {
                    "inputs": {
                        "ckpt_name": "sdxl-动漫二次元_2.0.safetensors"
                    },
                    "class_type": "CheckpointLoaderSimple",
                    "_meta": {
                        "title": "Checkpoint加载器(简易)"
                    }
                },
                "5": {
                    "inputs": {
                        "width": 512,
                        "height": 512,
                        "batch_size": 1
                    },
                    "class_type": "EmptyLatentImage",
                    "_meta": {
                        "title": "空Latent"
                    }
                },
                "6": {
                    "inputs": {
                        "text": "1girl,flower,outdoors,solo,dress,long hair,closed eyes,sky,holding,smile,cloud,open mouth,field,blush,day,blue sky,white flower,holding flower,flower field,short sleeves,teeth,blue dress,petals,:d,facing viewer,grey hair,floating hair,wind,happy,^_^,daisy,upper teeth only,white dress,",
                        "clip": [
                            "4",
                            1
                        ]
                    },
                    "class_type": "CLIPTextEncode",
                    "_meta": {
                        "title": "CLIP文本编码器"
                    }
                },
                "7": {
                    "inputs": {
                        "text": "(worst quality, low quality),deformed,distorted,disfigured,doll,poorly drawn,bad anatomy,wrong anatomy,",
                        "clip": [
                            "4",
                            1
                        ]
                    },
                    "class_type": "CLIPTextEncode",
                    "_meta": {
                        "title": "CLIP文本编码器"
                    }
                },
                "8": {
                    "inputs": {
                        "samples": [
                            "3",
                            0
                        ],
                        "vae": [
                            "4",
                            2
                        ]
                    },
                    "class_type": "VAEDecode",
                    "_meta": {
                        "title": "VAE解码"
                    }
                },
                "9": {
                    "inputs": {
                        "filename_prefix": "ComfyUI",
                        "images": [
                            "8",
                            0
                        ]
                    },
                    "class_type": "SaveImage",
                    "_meta": {
                        "title": "保存图像"
                    }
                }
            }, {
                "extra_pnginfo": {
                    "workflow": {
                        "last_node_id": 9,
                        "last_link_id": 9,
                        "nodes": [{
                                "id": 5,
                                "type": "EmptyLatentImage",
                                "pos": [
                                    473,
                                    609
                                ],
                                "size": {
                                    "0": 315,
                                    "1": 106
                                },
                                "flags": {},
                                "order": 0,
                                "mode": 0,
                                "outputs": [{
                                        "name": "LATENT",
                                        "type": "LATENT",
                                        "links": "[Object]",
                                        "slot_index": 0,
                                        "label": "Latent"
                                    }
                                ],
                                "properties": {
                                    "Node name for S&R": "EmptyLatentImage"
                                },
                                "widgets_values": [
                                    512,
                                    512,
                                    1
                                ]
                            }, {
                                "id": 8,
                                "type": "VAEDecode",
                                "pos": [
                                    1209,
                                    188
                                ],
                                "size": {
                                    "0": 210,
                                    "1": 46
                                },
                                "flags": {},
                                "order": 5,
                                "mode": 0,
                                "inputs": [{
                                        "name": "samples",
                                        "type": "LATENT",
                                        "link": 7,
                                        "label": "Latent"
                                    }, {
                                        "name": "vae",
                                        "type": "VAE",
                                        "link": 8,
                                        "label": "VAE"
                                    }
                                ],
                                "outputs": [{
                                        "name": "IMAGE",
                                        "type": "IMAGE",
                                        "links": "[Object]",
                                        "slot_index": 0,
                                        "label": "图像"
                                    }
                                ],
                                "properties": {
                                    "Node name for S&R": "VAEDecode"
                                }
                            }, {
                                "id": 9,
                                "type": "SaveImage",
                                "pos": [
                                    1451,
                                    189
                                ],
                                "size": {
                                    "0": 210,
                                    "1": 58
                                },
                                "flags": {},
                                "order": 6,
                                "mode": 0,
                                "inputs": [{
                                        "name": "images",
                                        "type": "IMAGE",
                                        "link": 9,
                                        "label": "图像"
                                    }
                                ],
                                "properties": {},
                                "widgets_values": [
                                    "ComfyUI"
                                ]
                            }, {
                                "id": 4,
                                "type": "CheckpointLoaderSimple",
                                "pos": [
                                    26,
                                    474
                                ],
                                "size": {
                                    "0": 315,
                                    "1": 98
                                },
                                "flags": {},
                                "order": 1,
                                "mode": 0,
                                "outputs": [{
                                        "name": "MODEL",
                                        "type": "MODEL",
                                        "links": "[Object]",
                                        "slot_index": 0,
                                        "label": "模型"
                                    }, {
                                        "name": "CLIP",
                                        "type": "CLIP",
                                        "links": "[Object]",
                                        "slot_index": 1,
                                        "label": "CLIP"
                                    }, {
                                        "name": "VAE",
                                        "type": "VAE",
                                        "links": "[Object]",
                                        "slot_index": 2,
                                        "label": "VAE"
                                    }
                                ],
                                "properties": {
                                    "Node name for S&R": "CheckpointLoaderSimple"
                                },
                                "widgets_values": [
                                    "sdxl-动漫二次元_2.0.safetensors"
                                ]
                            }, {
                                "id": 6,
                                "type": "CLIPTextEncode",
                                "pos": [
                                    250,
                                    70
                                ],
                                "size": {
                                    "0": 422.84503173828125,
                                    "1": 164.31304931640625
                                },
                                "flags": {},
                                "order": 2,
                                "mode": 0,
                                "inputs": [{
                                        "name": "clip",
                                        "type": "CLIP",
                                        "link": 3,
                                        "label": "CLIP"
                                    }
                                ],
                                "outputs": [{
                                        "name": "CONDITIONING",
                                        "type": "CONDITIONING",
                                        "links": "[Object]",
                                        "slot_index": 0,
                                        "label": "条件"
                                    }
                                ],
                                "properties": {
                                    "Node name for S&R": "CLIPTextEncode"
                                },
                                "widgets_values": [
                                    "1girl,flower,outdoors,solo,dress,long hair,closed eyes,sky,holding,smile,cloud,open mouth,field,blush,day,blue sky,white flower,holding flower,flower field,short sleeves,teeth,blue dress,petals,:d,facing viewer,grey hair,floating hair,wind,happy,^_^,daisy,upper teeth only,white dress,"
                                ]
                            }, {
                                "id": 7,
                                "type": "CLIPTextEncode",
                                "pos": [
                                    340,
                                    290
                                ],
                                "size": {
                                    "0": 425.27801513671875,
                                    "1": 180.6060791015625
                                },
                                "flags": {},
                                "order": 3,
                                "mode": 0,
                                "inputs": [{
                                        "name": "clip",
                                        "type": "CLIP",
                                        "link": 5,
                                        "label": "CLIP"
                                    }
                                ],
                                "outputs": [{
                                        "name": "CONDITIONING",
                                        "type": "CONDITIONING",
                                        "links": "[Object]",
                                        "slot_index": 0,
                                        "label": "条件"
                                    }
                                ],
                                "properties": {
                                    "Node name for S&R": "CLIPTextEncode"
                                },
                                "widgets_values": [
                                    "(worst quality, low quality),deformed,distorted,disfigured,doll,poorly drawn,bad anatomy,wrong anatomy,"
                                ]
                            }, {
                                "id": 3,
                                "type": "KSampler",
                                "pos": [
                                    863,
                                    186
                                ],
                                "size": {
                                    "0": 315,
                                    "1": 262
                                },
                                "flags": {},
                                "order": 4,
                                "mode": 0,
                                "inputs": [{
                                        "name": "model",
                                        "type": "MODEL",
                                        "link": 1,
                                        "label": "模型"
                                    }, {
                                        "name": "positive",
                                        "type": "CONDITIONING",
                                        "link": 4,
                                        "label": "正面条件"
                                    }, {
                                        "name": "negative",
                                        "type": "CONDITIONING",
                                        "link": 6,
                                        "label": "负面条件"
                                    }, {
                                        "name": "latent_image",
                                        "type": "LATENT",
                                        "link": 2,
                                        "label": "Latent"
                                    }
                                ],
                                "outputs": [{
                                        "name": "LATENT",
                                        "type": "LATENT",
                                        "links": "[Object]",
                                        "slot_index": 0,
                                        "label": "Latent"
                                    }
                                ],
                                "properties": {
                                    "Node name for S&R": "KSampler"
                                },
                                "widgets_values": [
                                    0,
                                    "randomize",
                                    30,
                                    8,
                                    "dpmpp_2m",
                                    "karras",
                                    1
                                ]
                            }
                        ],
                        "links": [
                            [
                                1,
                                4,
                                0,
                                3,
                                0,
                                "MODEL"
                            ],
                            [
                                2,
                                5,
                                0,
                                3,
                                3,
                                "LATENT"
                            ],
                            [
                                3,
                                4,
                                1,
                                6,
                                0,
                                "CLIP"
                            ],
                            [
                                4,
                                6,
                                0,
                                3,
                                1,
                                "CONDITIONING"
                            ],
                            [
                                5,
                                4,
                                1,
                                7,
                                0,
                                "CLIP"
                            ],
                            [
                                6,
                                7,
                                0,
                                3,
                                2,
                                "CONDITIONING"
                            ],
                            [
                                7,
                                3,
                                0,
                                8,
                                0,
                                "LATENT"
                            ],
                            [
                                8,
                                4,
                                2,
                                8,
                                1,
                                "VAE"
                            ],
                            [
                                9,
                                8,
                                0,
                                9,
                                0,
                                "IMAGE"
                            ]
                        ],
                        "groups": [],
                        "config": {},
                        "extra": {
                            "ds": {
                                "scale": 1,
                                "offset": {
                                    "0": 858,
                                    "1": 196
                                }
                            }
                        },
                        "version": 0.4,
                        "widget_idx_map": {
                            "3": {
                                "seed": 0,
                                "sampler_name": 4,
                                "scheduler": 5
                            }
                        }
                    }
                },
                "client_id": "a4ff6051dabe4c7d994460b62c6c8f14"
            },
            [
                "9"
            ]
        ],
        "outputs": {
            "9": {
                "images": [{
                        "filename": "ComfyUI_00131_.png",
                        "subfolder": "",
                        "type": "output"
                    }
                ]
            }
        },
        "status": {
            "status_str": "success",
            "completed": true,
            "messages": [
                [
                    "execution_start", {
                        "prompt_id": "d40751e8-3e96-472f-a818-90d36d06faf1"
                    }
                ],
                [
                    "execution_cached", {
                        "nodes": [],
                        "prompt_id": "d40751e8-3e96-472f-a818-90d36d06faf1"
                    }
                ]
            ]
        }
    }
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» d40751e8-3e96-472f-a818-90d36d06faf1objecttruenonenone
»» prompt[object]truenonenone
»» outputs[object]truenonenone
»» status[object]truenonenone

GET /system_stats

GET /system_stats

系统统计信息接口

返回成功示例

{
  "system": {
    "os": "nt",
    "python_version": "3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]",
    "embedded_python": false
  },
  "devices": [
    {
      "name": "cuda:0 NVIDIA GeForce RTX 4070 Ti SUPER : cudaMallocAsync",
      "type": "cuda",
      "index": 0,
      "vram_total": 17170956288,
      "vram_free": 15702425600,
      "torch_vram_total": 67108864,
      "torch_vram_free": 33554432
    }
  ]
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» systemobjecttruenonenone
»» osstringtruenonenone
»» python_versionstringtruenonenone
»» embedded_pythonbooleantruenonenone
» devices[object]truenonenone
»» namestringfalsenonenone
»» typestringfalsenonenone
»» indexintegerfalsenonenone
»» vram_totalintegerfalsenonenone
»» vram_freeintegerfalsenonenone
»» torch_vram_totalintegerfalsenonenone
»» torch_vram_freeintegerfalsenonenone

GET /object_info/{node_class}

GET /object_info/KSampler

根据组件名称获取系统中组件参数

返回示例
成功

{
  "KSampler": {
    "input": {
      "required": {
        "model": [
          "MODEL"
        ],
        "seed": [
          "INT",
          {
            "default": 0,
            "min": 0,
            "max": 18446744073709552000
          }
        ],
        "steps": [
          "INT",
          {
            "default": 20,
            "min": 1,
            "max": 10000
          }
        ],
        "cfg": [
          "FLOAT",
          {
            "default": 8,
            "min": 0,
            "max": 100,
            "step": 0.1,
            "round": 0.01
          }
        ],
        "sampler_name": [
          [
            "euler",
            "euler_ancestral",
            "heun",
            "heunpp2",
            "dpm_2",
            "dpm_2_ancestral",
            "lms",
            "dpm_fast",
            "dpm_adaptive",
            "dpmpp_2s_ancestral",
            "dpmpp_sde",
            "dpmpp_sde_gpu",
            "dpmpp_2m",
            "dpmpp_2m_sde",
            "dpmpp_2m_sde_gpu",
            "dpmpp_3m_sde",
            "dpmpp_3m_sde_gpu",
            "ddpm",
            "lcm",
            "ddim",
            "uni_pc",
            "uni_pc_bh2"
          ]
        ],
        "scheduler": [
          [
            "normal",
            "karras",
            "exponential",
            "sgm_uniform",
            "simple",
            "ddim_uniform"
          ]
        ],
        "positive": [
          "CONDITIONING"
        ],
        "negative": [
          "CONDITIONING"
        ],
        "latent_image": [
          "LATENT"
        ],
        "denoise": [
          "FLOAT",
          {
            "default": 1,
            "min": 0,
            "max": 1,
            "step": 0.01
          }
        ]
      }
    },
    "output": [
      "LATENT"
    ],
    "output_is_list": [
      false
    ],
    "output_name": [
      "LATENT"
    ],
    "name": "KSampler",
    "display_name": "KSampler",
    "description": "",
    "category": "sampling",
    "output_node": false
  }
}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» KSamplerobjecttruenonenone
»» inputobjecttruenonenone
»»» requiredobjecttruenonenone
»»»» model[string]truenonenone
»»»» seed[object]truenonenone

关注我,分享更多精彩内容。###

您也可以看我用apifox发布生成的api调用示例链接

  • 22
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值