/prompt
curl --request POST \
--url http://localhost:8188/prompt \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "456488948754864847984646",
"prompt": {
"3": {
"inputs": {
"seed": 55129609097542,
"steps": 12,
"cfg": 8,
"sampler_name": "dpmpp_sde",
"scheduler": "normal",
"denoise": 1,
"model": [
"25",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler"
},
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 1
},
"class_type": "EmptyLatentImage"
},
"6": {
"inputs": {
"text": "masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\n",
"clip": [
"25",
1
]
},
"class_type": "CLIPTextEncode"
},
"7": {
"inputs": {
"text": "bad hands, text, watermark\n",
"clip": [
"25",
1
]
},
"class_type": "CLIPTextEncode"
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEDecode"
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"class_type": "SaveImage"
},
"11": {
"inputs": {
"seed": 811699257308810,
"steps": 14,
"cfg": 8,
"sampler_name": "uni_pc_bh2",
"scheduler": "normal",
"denoise": 0.5,
"model": [
"25",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"20",
0
]
},
"class_type": "KSampler"
},
"12": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"13",
0
]
},
"class_type": "SaveImage"
},
"13": {
"inputs": {
"samples": [
"11",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEDecode"
},
"20": {
"inputs": {
"pixels": [
"24",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEEncode"
},
"21": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEDecode"
},
"22": {
"inputs": {
"upscale_model": [
"23",
0
],
"image": [
"21",
0
]
},
"class_type": "ImageUpscaleWithModel"
},
"23": {
"inputs": {
"model_name": "RealESRGAN_x4plus.pth"
},
"class_type": "UpscaleModelLoader"
},
"24": {
"inputs": {
"upscale_method": "bilinear",
"width": 1024,
"height": 1024,
"crop": "disabled",
"image": [
"22",
0
]
},
"class_type": "ImageScale"
},
"25": {
"inputs": {
"ckpt_name": "babes_20.safetensors"
},
"class_type": "CheckpointLoaderSimple"
}
}
}
'import requests
url = "http://localhost:8188/prompt"
payload = {
"client_id": "456488948754864847984646",
"prompt": {
"3": {
"inputs": {
"seed": 55129609097542,
"steps": 12,
"cfg": 8,
"sampler_name": "dpmpp_sde",
"scheduler": "normal",
"denoise": 1,
"model": ["25", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["5", 0]
},
"class_type": "KSampler"
},
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 1
},
"class_type": "EmptyLatentImage"
},
"6": {
"inputs": {
"text": "masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky
",
"clip": ["25", 1]
},
"class_type": "CLIPTextEncode"
},
"7": {
"inputs": {
"text": "bad hands, text, watermark
",
"clip": ["25", 1]
},
"class_type": "CLIPTextEncode"
},
"8": {
"inputs": {
"samples": ["3", 0],
"vae": ["25", 2]
},
"class_type": "VAEDecode"
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": ["8", 0]
},
"class_type": "SaveImage"
},
"11": {
"inputs": {
"seed": 811699257308810,
"steps": 14,
"cfg": 8,
"sampler_name": "uni_pc_bh2",
"scheduler": "normal",
"denoise": 0.5,
"model": ["25", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["20", 0]
},
"class_type": "KSampler"
},
"12": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": ["13", 0]
},
"class_type": "SaveImage"
},
"13": {
"inputs": {
"samples": ["11", 0],
"vae": ["25", 2]
},
"class_type": "VAEDecode"
},
"20": {
"inputs": {
"pixels": ["24", 0],
"vae": ["25", 2]
},
"class_type": "VAEEncode"
},
"21": {
"inputs": {
"samples": ["3", 0],
"vae": ["25", 2]
},
"class_type": "VAEDecode"
},
"22": {
"inputs": {
"upscale_model": ["23", 0],
"image": ["21", 0]
},
"class_type": "ImageUpscaleWithModel"
},
"23": {
"inputs": { "model_name": "RealESRGAN_x4plus.pth" },
"class_type": "UpscaleModelLoader"
},
"24": {
"inputs": {
"upscale_method": "bilinear",
"width": 1024,
"height": 1024,
"crop": "disabled",
"image": ["22", 0]
},
"class_type": "ImageScale"
},
"25": {
"inputs": { "ckpt_name": "babes_20.safetensors" },
"class_type": "CheckpointLoaderSimple"
}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: '456488948754864847984646',
prompt: {
'3': {
inputs: {
seed: 55129609097542,
steps: 12,
cfg: 8,
sampler_name: 'dpmpp_sde',
scheduler: 'normal',
denoise: 1,
model: ['25', 0],
positive: ['6', 0],
negative: ['7', 0],
latent_image: ['5', 0]
},
class_type: 'KSampler'
},
'5': {
inputs: {width: 512, height: 512, batch_size: 1},
class_type: 'EmptyLatentImage'
},
'6': {
inputs: {
text: 'masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\n',
clip: ['25', 1]
},
class_type: 'CLIPTextEncode'
},
'7': {
inputs: {text: 'bad hands, text, watermark\n', clip: ['25', 1]},
class_type: 'CLIPTextEncode'
},
'8': {inputs: {samples: ['3', 0], vae: ['25', 2]}, class_type: 'VAEDecode'},
'9': {
inputs: {filename_prefix: 'ComfyUI', images: ['8', 0]},
class_type: 'SaveImage'
},
'11': {
inputs: {
seed: 811699257308810,
steps: 14,
cfg: 8,
sampler_name: 'uni_pc_bh2',
scheduler: 'normal',
denoise: 0.5,
model: ['25', 0],
positive: ['6', 0],
negative: ['7', 0],
latent_image: ['20', 0]
},
class_type: 'KSampler'
},
'12': {
inputs: {filename_prefix: 'ComfyUI', images: ['13', 0]},
class_type: 'SaveImage'
},
'13': {inputs: {samples: ['11', 0], vae: ['25', 2]}, class_type: 'VAEDecode'},
'20': {inputs: {pixels: ['24', 0], vae: ['25', 2]}, class_type: 'VAEEncode'},
'21': {inputs: {samples: ['3', 0], vae: ['25', 2]}, class_type: 'VAEDecode'},
'22': {
inputs: {upscale_model: ['23', 0], image: ['21', 0]},
class_type: 'ImageUpscaleWithModel'
},
'23': {
inputs: {model_name: 'RealESRGAN_x4plus.pth'},
class_type: 'UpscaleModelLoader'
},
'24': {
inputs: {
upscale_method: 'bilinear',
width: 1024,
height: 1024,
crop: 'disabled',
image: ['22', 0]
},
class_type: 'ImageScale'
},
'25': {
inputs: {ckpt_name: 'babes_20.safetensors'},
class_type: 'CheckpointLoaderSimple'
}
}
})
};
fetch('http://localhost:8188/prompt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8188",
CURLOPT_URL => "http://localhost:8188/prompt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => '456488948754864847984646',
'prompt' => [
'3' => [
'inputs' => [
'seed' => 55129609097542,
'steps' => 12,
'cfg' => 8,
'sampler_name' => 'dpmpp_sde',
'scheduler' => 'normal',
'denoise' => 1,
'model' => [
'25',
0
],
'positive' => [
'6',
0
],
'negative' => [
'7',
0
],
'latent_image' => [
'5',
0
]
],
'class_type' => 'KSampler'
],
'5' => [
'inputs' => [
'width' => 512,
'height' => 512,
'batch_size' => 1
],
'class_type' => 'EmptyLatentImage'
],
'6' => [
'inputs' => [
'text' => 'masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky
',
'clip' => [
'25',
1
]
],
'class_type' => 'CLIPTextEncode'
],
'7' => [
'inputs' => [
'text' => 'bad hands, text, watermark
',
'clip' => [
'25',
1
]
],
'class_type' => 'CLIPTextEncode'
],
'8' => [
'inputs' => [
'samples' => [
'3',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEDecode'
],
'9' => [
'inputs' => [
'filename_prefix' => 'ComfyUI',
'images' => [
'8',
0
]
],
'class_type' => 'SaveImage'
],
'11' => [
'inputs' => [
'seed' => 811699257308810,
'steps' => 14,
'cfg' => 8,
'sampler_name' => 'uni_pc_bh2',
'scheduler' => 'normal',
'denoise' => 0.5,
'model' => [
'25',
0
],
'positive' => [
'6',
0
],
'negative' => [
'7',
0
],
'latent_image' => [
'20',
0
]
],
'class_type' => 'KSampler'
],
'12' => [
'inputs' => [
'filename_prefix' => 'ComfyUI',
'images' => [
'13',
0
]
],
'class_type' => 'SaveImage'
],
'13' => [
'inputs' => [
'samples' => [
'11',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEDecode'
],
'20' => [
'inputs' => [
'pixels' => [
'24',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEEncode'
],
'21' => [
'inputs' => [
'samples' => [
'3',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEDecode'
],
'22' => [
'inputs' => [
'upscale_model' => [
'23',
0
],
'image' => [
'21',
0
]
],
'class_type' => 'ImageUpscaleWithModel'
],
'23' => [
'inputs' => [
'model_name' => 'RealESRGAN_x4plus.pth'
],
'class_type' => 'UpscaleModelLoader'
],
'24' => [
'inputs' => [
'upscale_method' => 'bilinear',
'width' => 1024,
'height' => 1024,
'crop' => 'disabled',
'image' => [
'22',
0
]
],
'class_type' => 'ImageScale'
],
'25' => [
'inputs' => [
'ckpt_name' => 'babes_20.safetensors'
],
'class_type' => 'CheckpointLoaderSimple'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8188/prompt"
payload := strings.NewReader("{\n \"client_id\": \"456488948754864847984646\",\n \"prompt\": {\n \"3\": {\n \"inputs\": {\n \"seed\": 55129609097542,\n \"steps\": 12,\n \"cfg\": 8,\n \"sampler_name\": \"dpmpp_sde\",\n \"scheduler\": \"normal\",\n \"denoise\": 1,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"5\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"5\": {\n \"inputs\": {\n \"width\": 512,\n \"height\": 512,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyLatentImage\"\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"bad hands, text, watermark\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"9\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"11\": {\n \"inputs\": {\n \"seed\": 811699257308810,\n \"steps\": 14,\n \"cfg\": 8,\n \"sampler_name\": \"uni_pc_bh2\",\n \"scheduler\": \"normal\",\n \"denoise\": 0.5,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"20\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"12\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"13\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"13\": {\n \"inputs\": {\n \"samples\": [\n \"11\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"20\": {\n \"inputs\": {\n \"pixels\": [\n \"24\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEEncode\"\n },\n \"21\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"22\": {\n \"inputs\": {\n \"upscale_model\": [\n \"23\",\n 0\n ],\n \"image\": [\n \"21\",\n 0\n ]\n },\n \"class_type\": \"ImageUpscaleWithModel\"\n },\n \"23\": {\n \"inputs\": {\n \"model_name\": \"RealESRGAN_x4plus.pth\"\n },\n \"class_type\": \"UpscaleModelLoader\"\n },\n \"24\": {\n \"inputs\": {\n \"upscale_method\": \"bilinear\",\n \"width\": 1024,\n \"height\": 1024,\n \"crop\": \"disabled\",\n \"image\": [\n \"22\",\n 0\n ]\n },\n \"class_type\": \"ImageScale\"\n },\n \"25\": {\n \"inputs\": {\n \"ckpt_name\": \"babes_20.safetensors\"\n },\n \"class_type\": \"CheckpointLoaderSimple\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8188/prompt")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"456488948754864847984646\",\n \"prompt\": {\n \"3\": {\n \"inputs\": {\n \"seed\": 55129609097542,\n \"steps\": 12,\n \"cfg\": 8,\n \"sampler_name\": \"dpmpp_sde\",\n \"scheduler\": \"normal\",\n \"denoise\": 1,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"5\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"5\": {\n \"inputs\": {\n \"width\": 512,\n \"height\": 512,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyLatentImage\"\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"bad hands, text, watermark\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"9\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"11\": {\n \"inputs\": {\n \"seed\": 811699257308810,\n \"steps\": 14,\n \"cfg\": 8,\n \"sampler_name\": \"uni_pc_bh2\",\n \"scheduler\": \"normal\",\n \"denoise\": 0.5,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"20\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"12\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"13\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"13\": {\n \"inputs\": {\n \"samples\": [\n \"11\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"20\": {\n \"inputs\": {\n \"pixels\": [\n \"24\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEEncode\"\n },\n \"21\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"22\": {\n \"inputs\": {\n \"upscale_model\": [\n \"23\",\n 0\n ],\n \"image\": [\n \"21\",\n 0\n ]\n },\n \"class_type\": \"ImageUpscaleWithModel\"\n },\n \"23\": {\n \"inputs\": {\n \"model_name\": \"RealESRGAN_x4plus.pth\"\n },\n \"class_type\": \"UpscaleModelLoader\"\n },\n \"24\": {\n \"inputs\": {\n \"upscale_method\": \"bilinear\",\n \"width\": 1024,\n \"height\": 1024,\n \"crop\": \"disabled\",\n \"image\": [\n \"22\",\n 0\n ]\n },\n \"class_type\": \"ImageScale\"\n },\n \"25\": {\n \"inputs\": {\n \"ckpt_name\": \"babes_20.safetensors\"\n },\n \"class_type\": \"CheckpointLoaderSimple\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8188/prompt")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"456488948754864847984646\",\n \"prompt\": {\n \"3\": {\n \"inputs\": {\n \"seed\": 55129609097542,\n \"steps\": 12,\n \"cfg\": 8,\n \"sampler_name\": \"dpmpp_sde\",\n \"scheduler\": \"normal\",\n \"denoise\": 1,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"5\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"5\": {\n \"inputs\": {\n \"width\": 512,\n \"height\": 512,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyLatentImage\"\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"bad hands, text, watermark\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"9\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"11\": {\n \"inputs\": {\n \"seed\": 811699257308810,\n \"steps\": 14,\n \"cfg\": 8,\n \"sampler_name\": \"uni_pc_bh2\",\n \"scheduler\": \"normal\",\n \"denoise\": 0.5,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"20\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"12\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"13\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"13\": {\n \"inputs\": {\n \"samples\": [\n \"11\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"20\": {\n \"inputs\": {\n \"pixels\": [\n \"24\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEEncode\"\n },\n \"21\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"22\": {\n \"inputs\": {\n \"upscale_model\": [\n \"23\",\n 0\n ],\n \"image\": [\n \"21\",\n 0\n ]\n },\n \"class_type\": \"ImageUpscaleWithModel\"\n },\n \"23\": {\n \"inputs\": {\n \"model_name\": \"RealESRGAN_x4plus.pth\"\n },\n \"class_type\": \"UpscaleModelLoader\"\n },\n \"24\": {\n \"inputs\": {\n \"upscale_method\": \"bilinear\",\n \"width\": 1024,\n \"height\": 1024,\n \"crop\": \"disabled\",\n \"image\": [\n \"22\",\n 0\n ]\n },\n \"class_type\": \"ImageScale\"\n },\n \"25\": {\n \"inputs\": {\n \"ckpt_name\": \"babes_20.safetensors\"\n },\n \"class_type\": \"CheckpointLoaderSimple\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"prompt_id": "<string>",
"number": 123,
"node_errors": {}
}ComfyUI-Api
提交任务
POST
/
prompt
/prompt
curl --request POST \
--url http://localhost:8188/prompt \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "456488948754864847984646",
"prompt": {
"3": {
"inputs": {
"seed": 55129609097542,
"steps": 12,
"cfg": 8,
"sampler_name": "dpmpp_sde",
"scheduler": "normal",
"denoise": 1,
"model": [
"25",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler"
},
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 1
},
"class_type": "EmptyLatentImage"
},
"6": {
"inputs": {
"text": "masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\n",
"clip": [
"25",
1
]
},
"class_type": "CLIPTextEncode"
},
"7": {
"inputs": {
"text": "bad hands, text, watermark\n",
"clip": [
"25",
1
]
},
"class_type": "CLIPTextEncode"
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEDecode"
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"class_type": "SaveImage"
},
"11": {
"inputs": {
"seed": 811699257308810,
"steps": 14,
"cfg": 8,
"sampler_name": "uni_pc_bh2",
"scheduler": "normal",
"denoise": 0.5,
"model": [
"25",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"20",
0
]
},
"class_type": "KSampler"
},
"12": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"13",
0
]
},
"class_type": "SaveImage"
},
"13": {
"inputs": {
"samples": [
"11",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEDecode"
},
"20": {
"inputs": {
"pixels": [
"24",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEEncode"
},
"21": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"25",
2
]
},
"class_type": "VAEDecode"
},
"22": {
"inputs": {
"upscale_model": [
"23",
0
],
"image": [
"21",
0
]
},
"class_type": "ImageUpscaleWithModel"
},
"23": {
"inputs": {
"model_name": "RealESRGAN_x4plus.pth"
},
"class_type": "UpscaleModelLoader"
},
"24": {
"inputs": {
"upscale_method": "bilinear",
"width": 1024,
"height": 1024,
"crop": "disabled",
"image": [
"22",
0
]
},
"class_type": "ImageScale"
},
"25": {
"inputs": {
"ckpt_name": "babes_20.safetensors"
},
"class_type": "CheckpointLoaderSimple"
}
}
}
'import requests
url = "http://localhost:8188/prompt"
payload = {
"client_id": "456488948754864847984646",
"prompt": {
"3": {
"inputs": {
"seed": 55129609097542,
"steps": 12,
"cfg": 8,
"sampler_name": "dpmpp_sde",
"scheduler": "normal",
"denoise": 1,
"model": ["25", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["5", 0]
},
"class_type": "KSampler"
},
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 1
},
"class_type": "EmptyLatentImage"
},
"6": {
"inputs": {
"text": "masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky
",
"clip": ["25", 1]
},
"class_type": "CLIPTextEncode"
},
"7": {
"inputs": {
"text": "bad hands, text, watermark
",
"clip": ["25", 1]
},
"class_type": "CLIPTextEncode"
},
"8": {
"inputs": {
"samples": ["3", 0],
"vae": ["25", 2]
},
"class_type": "VAEDecode"
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": ["8", 0]
},
"class_type": "SaveImage"
},
"11": {
"inputs": {
"seed": 811699257308810,
"steps": 14,
"cfg": 8,
"sampler_name": "uni_pc_bh2",
"scheduler": "normal",
"denoise": 0.5,
"model": ["25", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["20", 0]
},
"class_type": "KSampler"
},
"12": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": ["13", 0]
},
"class_type": "SaveImage"
},
"13": {
"inputs": {
"samples": ["11", 0],
"vae": ["25", 2]
},
"class_type": "VAEDecode"
},
"20": {
"inputs": {
"pixels": ["24", 0],
"vae": ["25", 2]
},
"class_type": "VAEEncode"
},
"21": {
"inputs": {
"samples": ["3", 0],
"vae": ["25", 2]
},
"class_type": "VAEDecode"
},
"22": {
"inputs": {
"upscale_model": ["23", 0],
"image": ["21", 0]
},
"class_type": "ImageUpscaleWithModel"
},
"23": {
"inputs": { "model_name": "RealESRGAN_x4plus.pth" },
"class_type": "UpscaleModelLoader"
},
"24": {
"inputs": {
"upscale_method": "bilinear",
"width": 1024,
"height": 1024,
"crop": "disabled",
"image": ["22", 0]
},
"class_type": "ImageScale"
},
"25": {
"inputs": { "ckpt_name": "babes_20.safetensors" },
"class_type": "CheckpointLoaderSimple"
}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: '456488948754864847984646',
prompt: {
'3': {
inputs: {
seed: 55129609097542,
steps: 12,
cfg: 8,
sampler_name: 'dpmpp_sde',
scheduler: 'normal',
denoise: 1,
model: ['25', 0],
positive: ['6', 0],
negative: ['7', 0],
latent_image: ['5', 0]
},
class_type: 'KSampler'
},
'5': {
inputs: {width: 512, height: 512, batch_size: 1},
class_type: 'EmptyLatentImage'
},
'6': {
inputs: {
text: 'masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\n',
clip: ['25', 1]
},
class_type: 'CLIPTextEncode'
},
'7': {
inputs: {text: 'bad hands, text, watermark\n', clip: ['25', 1]},
class_type: 'CLIPTextEncode'
},
'8': {inputs: {samples: ['3', 0], vae: ['25', 2]}, class_type: 'VAEDecode'},
'9': {
inputs: {filename_prefix: 'ComfyUI', images: ['8', 0]},
class_type: 'SaveImage'
},
'11': {
inputs: {
seed: 811699257308810,
steps: 14,
cfg: 8,
sampler_name: 'uni_pc_bh2',
scheduler: 'normal',
denoise: 0.5,
model: ['25', 0],
positive: ['6', 0],
negative: ['7', 0],
latent_image: ['20', 0]
},
class_type: 'KSampler'
},
'12': {
inputs: {filename_prefix: 'ComfyUI', images: ['13', 0]},
class_type: 'SaveImage'
},
'13': {inputs: {samples: ['11', 0], vae: ['25', 2]}, class_type: 'VAEDecode'},
'20': {inputs: {pixels: ['24', 0], vae: ['25', 2]}, class_type: 'VAEEncode'},
'21': {inputs: {samples: ['3', 0], vae: ['25', 2]}, class_type: 'VAEDecode'},
'22': {
inputs: {upscale_model: ['23', 0], image: ['21', 0]},
class_type: 'ImageUpscaleWithModel'
},
'23': {
inputs: {model_name: 'RealESRGAN_x4plus.pth'},
class_type: 'UpscaleModelLoader'
},
'24': {
inputs: {
upscale_method: 'bilinear',
width: 1024,
height: 1024,
crop: 'disabled',
image: ['22', 0]
},
class_type: 'ImageScale'
},
'25': {
inputs: {ckpt_name: 'babes_20.safetensors'},
class_type: 'CheckpointLoaderSimple'
}
}
})
};
fetch('http://localhost:8188/prompt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8188",
CURLOPT_URL => "http://localhost:8188/prompt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => '456488948754864847984646',
'prompt' => [
'3' => [
'inputs' => [
'seed' => 55129609097542,
'steps' => 12,
'cfg' => 8,
'sampler_name' => 'dpmpp_sde',
'scheduler' => 'normal',
'denoise' => 1,
'model' => [
'25',
0
],
'positive' => [
'6',
0
],
'negative' => [
'7',
0
],
'latent_image' => [
'5',
0
]
],
'class_type' => 'KSampler'
],
'5' => [
'inputs' => [
'width' => 512,
'height' => 512,
'batch_size' => 1
],
'class_type' => 'EmptyLatentImage'
],
'6' => [
'inputs' => [
'text' => 'masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky
',
'clip' => [
'25',
1
]
],
'class_type' => 'CLIPTextEncode'
],
'7' => [
'inputs' => [
'text' => 'bad hands, text, watermark
',
'clip' => [
'25',
1
]
],
'class_type' => 'CLIPTextEncode'
],
'8' => [
'inputs' => [
'samples' => [
'3',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEDecode'
],
'9' => [
'inputs' => [
'filename_prefix' => 'ComfyUI',
'images' => [
'8',
0
]
],
'class_type' => 'SaveImage'
],
'11' => [
'inputs' => [
'seed' => 811699257308810,
'steps' => 14,
'cfg' => 8,
'sampler_name' => 'uni_pc_bh2',
'scheduler' => 'normal',
'denoise' => 0.5,
'model' => [
'25',
0
],
'positive' => [
'6',
0
],
'negative' => [
'7',
0
],
'latent_image' => [
'20',
0
]
],
'class_type' => 'KSampler'
],
'12' => [
'inputs' => [
'filename_prefix' => 'ComfyUI',
'images' => [
'13',
0
]
],
'class_type' => 'SaveImage'
],
'13' => [
'inputs' => [
'samples' => [
'11',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEDecode'
],
'20' => [
'inputs' => [
'pixels' => [
'24',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEEncode'
],
'21' => [
'inputs' => [
'samples' => [
'3',
0
],
'vae' => [
'25',
2
]
],
'class_type' => 'VAEDecode'
],
'22' => [
'inputs' => [
'upscale_model' => [
'23',
0
],
'image' => [
'21',
0
]
],
'class_type' => 'ImageUpscaleWithModel'
],
'23' => [
'inputs' => [
'model_name' => 'RealESRGAN_x4plus.pth'
],
'class_type' => 'UpscaleModelLoader'
],
'24' => [
'inputs' => [
'upscale_method' => 'bilinear',
'width' => 1024,
'height' => 1024,
'crop' => 'disabled',
'image' => [
'22',
0
]
],
'class_type' => 'ImageScale'
],
'25' => [
'inputs' => [
'ckpt_name' => 'babes_20.safetensors'
],
'class_type' => 'CheckpointLoaderSimple'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8188/prompt"
payload := strings.NewReader("{\n \"client_id\": \"456488948754864847984646\",\n \"prompt\": {\n \"3\": {\n \"inputs\": {\n \"seed\": 55129609097542,\n \"steps\": 12,\n \"cfg\": 8,\n \"sampler_name\": \"dpmpp_sde\",\n \"scheduler\": \"normal\",\n \"denoise\": 1,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"5\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"5\": {\n \"inputs\": {\n \"width\": 512,\n \"height\": 512,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyLatentImage\"\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"bad hands, text, watermark\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"9\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"11\": {\n \"inputs\": {\n \"seed\": 811699257308810,\n \"steps\": 14,\n \"cfg\": 8,\n \"sampler_name\": \"uni_pc_bh2\",\n \"scheduler\": \"normal\",\n \"denoise\": 0.5,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"20\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"12\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"13\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"13\": {\n \"inputs\": {\n \"samples\": [\n \"11\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"20\": {\n \"inputs\": {\n \"pixels\": [\n \"24\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEEncode\"\n },\n \"21\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"22\": {\n \"inputs\": {\n \"upscale_model\": [\n \"23\",\n 0\n ],\n \"image\": [\n \"21\",\n 0\n ]\n },\n \"class_type\": \"ImageUpscaleWithModel\"\n },\n \"23\": {\n \"inputs\": {\n \"model_name\": \"RealESRGAN_x4plus.pth\"\n },\n \"class_type\": \"UpscaleModelLoader\"\n },\n \"24\": {\n \"inputs\": {\n \"upscale_method\": \"bilinear\",\n \"width\": 1024,\n \"height\": 1024,\n \"crop\": \"disabled\",\n \"image\": [\n \"22\",\n 0\n ]\n },\n \"class_type\": \"ImageScale\"\n },\n \"25\": {\n \"inputs\": {\n \"ckpt_name\": \"babes_20.safetensors\"\n },\n \"class_type\": \"CheckpointLoaderSimple\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8188/prompt")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"456488948754864847984646\",\n \"prompt\": {\n \"3\": {\n \"inputs\": {\n \"seed\": 55129609097542,\n \"steps\": 12,\n \"cfg\": 8,\n \"sampler_name\": \"dpmpp_sde\",\n \"scheduler\": \"normal\",\n \"denoise\": 1,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"5\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"5\": {\n \"inputs\": {\n \"width\": 512,\n \"height\": 512,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyLatentImage\"\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"bad hands, text, watermark\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"9\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"11\": {\n \"inputs\": {\n \"seed\": 811699257308810,\n \"steps\": 14,\n \"cfg\": 8,\n \"sampler_name\": \"uni_pc_bh2\",\n \"scheduler\": \"normal\",\n \"denoise\": 0.5,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"20\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"12\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"13\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"13\": {\n \"inputs\": {\n \"samples\": [\n \"11\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"20\": {\n \"inputs\": {\n \"pixels\": [\n \"24\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEEncode\"\n },\n \"21\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"22\": {\n \"inputs\": {\n \"upscale_model\": [\n \"23\",\n 0\n ],\n \"image\": [\n \"21\",\n 0\n ]\n },\n \"class_type\": \"ImageUpscaleWithModel\"\n },\n \"23\": {\n \"inputs\": {\n \"model_name\": \"RealESRGAN_x4plus.pth\"\n },\n \"class_type\": \"UpscaleModelLoader\"\n },\n \"24\": {\n \"inputs\": {\n \"upscale_method\": \"bilinear\",\n \"width\": 1024,\n \"height\": 1024,\n \"crop\": \"disabled\",\n \"image\": [\n \"22\",\n 0\n ]\n },\n \"class_type\": \"ImageScale\"\n },\n \"25\": {\n \"inputs\": {\n \"ckpt_name\": \"babes_20.safetensors\"\n },\n \"class_type\": \"CheckpointLoaderSimple\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8188/prompt")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"456488948754864847984646\",\n \"prompt\": {\n \"3\": {\n \"inputs\": {\n \"seed\": 55129609097542,\n \"steps\": 12,\n \"cfg\": 8,\n \"sampler_name\": \"dpmpp_sde\",\n \"scheduler\": \"normal\",\n \"denoise\": 1,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"5\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"5\": {\n \"inputs\": {\n \"width\": 512,\n \"height\": 512,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyLatentImage\"\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"bad hands, text, watermark\\n\",\n \"clip\": [\n \"25\",\n 1\n ]\n },\n \"class_type\": \"CLIPTextEncode\"\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"9\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"11\": {\n \"inputs\": {\n \"seed\": 811699257308810,\n \"steps\": 14,\n \"cfg\": 8,\n \"sampler_name\": \"uni_pc_bh2\",\n \"scheduler\": \"normal\",\n \"denoise\": 0.5,\n \"model\": [\n \"25\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"20\",\n 0\n ]\n },\n \"class_type\": \"KSampler\"\n },\n \"12\": {\n \"inputs\": {\n \"filename_prefix\": \"ComfyUI\",\n \"images\": [\n \"13\",\n 0\n ]\n },\n \"class_type\": \"SaveImage\"\n },\n \"13\": {\n \"inputs\": {\n \"samples\": [\n \"11\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"20\": {\n \"inputs\": {\n \"pixels\": [\n \"24\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEEncode\"\n },\n \"21\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"25\",\n 2\n ]\n },\n \"class_type\": \"VAEDecode\"\n },\n \"22\": {\n \"inputs\": {\n \"upscale_model\": [\n \"23\",\n 0\n ],\n \"image\": [\n \"21\",\n 0\n ]\n },\n \"class_type\": \"ImageUpscaleWithModel\"\n },\n \"23\": {\n \"inputs\": {\n \"model_name\": \"RealESRGAN_x4plus.pth\"\n },\n \"class_type\": \"UpscaleModelLoader\"\n },\n \"24\": {\n \"inputs\": {\n \"upscale_method\": \"bilinear\",\n \"width\": 1024,\n \"height\": 1024,\n \"crop\": \"disabled\",\n \"image\": [\n \"22\",\n 0\n ]\n },\n \"class_type\": \"ImageScale\"\n },\n \"25\": {\n \"inputs\": {\n \"ckpt_name\": \"babes_20.safetensors\"\n },\n \"class_type\": \"CheckpointLoaderSimple\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"prompt_id": "<string>",
"number": 123,
"node_errors": {}
}
