R
Runpod7mo ago
Jacob

Bad requests

I have just the normal 3.6.0 sdxl docker running on my serverless but i just cannot get it to request correctly with a workflow. According to github which is literally the only place with any documentation it says a workflow can be passed but nothing I've tried works its just endless 400 bad request...
{
"input": {
"prompt": prompt,
"num_inference_steps": 50,
"width": 1024,
"height": 1024,
"guidance_scale": 15,
"high_noise_frac": 1.2
}
}
{
"input": {
"prompt": prompt,
"num_inference_steps": 50,
"width": 1024,
"height": 1024,
"guidance_scale": 15,
"high_noise_frac": 1.2
}
}
for some reason it will accept this but when I pass a workflow like this it just errors from the request.
{
"input": {
"workflow": {
"1": {
"inputs": {
"ckpt_name": "sd_xl_base_1.0.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint"
}
},
"2": {
"inputs": {
"seed": 0,
"steps": 20,
"cfg": 8,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"1",
0
],
"positive": [
"3",
0
],
"negative": [
"4",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"3": {
"inputs": {
"text": "positive prompt here",
"clip": [
"1",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"4": {
"inputs": {
"text": "negative prompt here",
"clip": [
"1",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"5": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
"6": {
"inputs": {
"samples": [
"2",
0
],
"vae": [
"1",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"7": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"6",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
}
}
}
}
{
"input": {
"workflow": {
"1": {
"inputs": {
"ckpt_name": "sd_xl_base_1.0.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint"
}
},
"2": {
"inputs": {
"seed": 0,
"steps": 20,
"cfg": 8,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"1",
0
],
"positive": [
"3",
0
],
"negative": [
"4",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"3": {
"inputs": {
"text": "positive prompt here",
"clip": [
"1",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"4": {
"inputs": {
"text": "negative prompt here",
"clip": [
"1",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"5": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
"6": {
"inputs": {
"samples": [
"2",
0
],
"vae": [
"1",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"7": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"6",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
}
}
}
}
36 Replies
Jacob
JacobOP7mo ago
I'm sure its something I'm doing wrong but there's zero info on how to do it properly from what I've found
curl -X POST -H "Authorization: Bearer <api_key>" -H "Content-Type: application/json" -d '{"input":{"workflow":{"3":{"inputs":{"seed":1337,"steps":20,"cfg":8,"sampler_name":"euler","scheduler":"normal","denoise":1,"model":["4",0],"positive":["6",0],"negative":["7",0],"latent_image":["5",0]},"class_type":"KSampler"},"4":{"inputs":{"ckpt_name":"sd_xl_base_1.0.safetensors"},"class_type":"CheckpointLoaderSimple"},"5":{"inputs":{"width":512,"height":512,"batch_size":1},"class_type":"EmptyLatentImage"},"6":{"inputs":{"text":"beautiful scenery nature glass bottle landscape, purple galaxy bottle,","clip":["4",1]},"class_type":"CLIPTextEncode"},"7":{"inputs":{"text":"text, watermark","clip":["4",1]},"class_type":"CLIPTextEncode"},"8":{"inputs":{"samples":["3",0],"vae":["4",2]},"class_type":"VAEDecode"},"9":{"inputs":{"filename_prefix":"ComfyUI","images":["8",0]},"class_type":"SaveImage"}}}}' https://api.runpod.ai/v2/<endpoint_id>/runsync
curl -X POST -H "Authorization: Bearer <api_key>" -H "Content-Type: application/json" -d '{"input":{"workflow":{"3":{"inputs":{"seed":1337,"steps":20,"cfg":8,"sampler_name":"euler","scheduler":"normal","denoise":1,"model":["4",0],"positive":["6",0],"negative":["7",0],"latent_image":["5",0]},"class_type":"KSampler"},"4":{"inputs":{"ckpt_name":"sd_xl_base_1.0.safetensors"},"class_type":"CheckpointLoaderSimple"},"5":{"inputs":{"width":512,"height":512,"batch_size":1},"class_type":"EmptyLatentImage"},"6":{"inputs":{"text":"beautiful scenery nature glass bottle landscape, purple galaxy bottle,","clip":["4",1]},"class_type":"CLIPTextEncode"},"7":{"inputs":{"text":"text, watermark","clip":["4",1]},"class_type":"CLIPTextEncode"},"8":{"inputs":{"samples":["3",0],"vae":["4",2]},"class_type":"VAEDecode"},"9":{"inputs":{"filename_prefix":"ComfyUI","images":["8",0]},"class_type":"SaveImage"}}}}' https://api.runpod.ai/v2/<endpoint_id>/runsync
this example request according to the github works
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Yeah I tried importing a workflow but it just gives the 400 bad request error on runpod so it must not be formated correctly or something It's the logs from runpod I think the worker one
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Ive been using a discord bot to send the requests like I said that first one works fine but workflows just error out
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
yeah noticed
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
thats the worker log
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
i sent the workflow i posted earlier
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Am I not? I thought I was I just picked the quick deploy thing
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Is there a different workflow for sdxl?
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Actually I think I deleted that one the one I'm on now is the sdxl one I thought it was also on comfy ui
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
I'll look into the sdxl requests, didn't see anything online so I was confused I might have to make a docker with that and just add the sdxl models I gues
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Thanks for replying though I appreciate it
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
I don't get this part though, the solution you gave will work but the docker even says comfyui for it so why would the requests be handled differently https://hub.docker.com/r/timpietruskyblibla/runpod-worker-comfy/tags "Run ComfyUI as a serverless API on RunPod." Don't see much info on the hf pipeline but I can just switch dockers I guess
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
Yeah that's apparently the version according to runpod
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
that's a different endpoint but the workflow I tested on that also didn't work And it apparently has comfyui
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
I can but it's throwing the same error idk just confused
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
I think it might have just given me a weird docker when I hit quick deploy I'll try with a fresh version of the one you sent first
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Jacob
JacobOP7mo ago
I think I got it working actually, I had a node incorrect I believe from what the log said. But that sdxl docker confused me because I thought it was comfyui like the other ones that's my fault Anyway I'll make a thread if I have problems have a good one
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?