COMFYUI · 14 · FILES & ACCEPTANCE

ComfyUI导出API工作流教程

区分画布 JSON 与 prompt 节点对象

错误/响应/字段教材

{
  "5": {
    "class_type": "EmptyLatentImage",
    "inputs": {
      "width": 512,
      "height": 512,
      "batch_size": 1
    }
  },
  "3": {
    "class_type": "KSampler",
    "inputs": {
      "model": [
        "4",
        0
      ],
      "positive": [
        "6",
        0
      ],
      "negative": [
        "7",
        0
      ],
      "latent_image": [
        "5",
        0
      ],
      "seed": 156680208700286,
      "steps": 20,
      "cfg": 8,
      "sampler_name": "euler",
      "scheduler": "normal",
      "denoise": 1
    }
  },
  "8": {
    "class_type": "VAEDecode",
    "inputs": {
      "samples": [
        "3",
        0
      ],
      "vae": [
        "4",
        2
      ]
    }
  },
  "9": {
    "class_type": "SaveImage",
    "inputs": {
      "images": [
        "8",
        0
      ],
      "filename_prefix": "practice/comfyui-export-api-format"
    }
  },
  "4": {
    "class_type": "CheckpointLoaderSimple",
    "inputs": {
      "ckpt_name": "v1-5-pruned-emaonly-fp16.safetensors"
    }
  },
  "6": {
    "class_type": "CLIPTextEncode",
    "inputs": {
      "clip": [
        "4",
        1
      ],
      "text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"
    }
  },
  "7": {
    "class_type": "CLIPTextEncode",
    "inputs": {
      "clip": [
        "4",
        1
      ],
      "text": "text, watermark"
    }
  }
}

实际验收表:留空等你运行

1

UI 文件与 API prompt 分开命名且用途明确。

实际文件 / 结果:待填写
2

class_type、inputs 与引用节点存在,误包 UI 的负样本被拒绝。

实际文件 / 结果:待填写
3

真实提交时返回 prompt_id 和 node_errors 被保存,未与其他 API 格式混用。

实际文件 / 结果:待填写

模型文件清单

CheckpointLoaderSimplev1-5-pruned-emaonly-fp16.safetensorsmodels/checkpoints
本站具体任务教材 · 文件真实渲染 · 结构核验通过不表示前端导入或模型推理已通过