#Bad requests

70 messages · Page 1 of 1 (latest)

bold tusk
#

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
        }
    }

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"
        }
      }
    }
  }
}

cyan widgetBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

bold tusk
#

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

this example request according to the github works

jovial solar
#

soo.. you can get the "workflow" request from comfyui and you put it inside correctly without invalid json right

jovial solar
bold tusk
#

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

jovial solar
#

can you copy it here?

jovial solar
#

it says json is valid tho

jovial solar
bold tusk
#

Ive been using a discord bot to send the requests like I said that first one works fine but workflows just error out

jovial solar
#

whats the code like?

jovial solar
#

whats the code you used to send the request, whats the error like

#

oh btw bearer toke

#

okay.

bold tusk
#

yeah noticed

jovial solar
bold tusk
#

thats the worker log

jovial solar
#

doesn't looks like a normal one i found from the github

bold tusk
#

i sent the workflow i posted earlier

jovial solar
#

oh... you're actually not running comfyui

#

that is why...

#

that workflow you formatted is for comfyui only

#

not for other workers

bold tusk
#

Am I not? I thought I was I just picked the quick deploy thing

jovial solar
#

which one?

#
INPUT_SCHEMA = {
    'prompt': {
        'type': str,
        'required': False,
    },
    'negative_prompt': {
        'type': str,
        'required': False,
        'default': None
    },
    'height': {
        'type': int,
        'required': False,
        'default': 1024
    },
    'width': {
        'type': int,
        'required': False,
        'default': 1024
    },
    'seed': {
        'type': int,
        'required': False,
        'default': None
    },
    'scheduler': {
        'type': str,
        'required': False,
        'default': 'DDIM'
    },
    'num_inference_steps': {
        'type': int,
        'required': False,
        'default': 25
    },
    'refiner_inference_steps': {
        'type': int,
        'required': False,
        'default': 50
    },
    'guidance_scale': {
        'type': float,
        'required': False,
        'default': 7.5
    },
    'strength': {
        'type': float,
        'required': False,
        'default': 0.3
    },
    'image_url': {
        'type': str,
        'required': False,
        'default': None
    },
    'num_images': {
        'type': int,
        'required': False,
        'default': 1,
        'constraints': lambda img_count: 3 > img_count > 0
    },
    'high_noise_frac': {
        'type': float,
        'required': False,
        'default': None
    },
}
bold tusk
#

Is there a different workflow for sdxl?

jovial solar
jovial solar
bold tusk
#

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

jovial solar
#

its okay let me give you the link to comfyui

bold tusk
#

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

jovial solar
jovial solar
#

just follow the guides, and if you're stuck somewhere feel free to open a new one in #1185337101307367535
so that the thread is cleaner

bold tusk
#

Thanks for replying though I appreciate it

jovial solar
#

Your welcome!

bold tusk
#

"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

jovial solar
bold tusk
#

Yeah that's apparently the version according to runpod

jovial solar
#

I see, there might be an error with your request inside the worker then but when it wanted to return the error, it didn't succeed because runpod cannot parse the response from the worker

#

That's what I thought

bold tusk
#

that's a different endpoint but the workflow I tested on that also didn't work

#

And it apparently has comfyui

jovial solar
#

Huh I'm getting confused here, can you make another thread instead for that one and one for the comfyui

#

So it doesn't get mixed up

bold tusk
#

I can but it's throwing the same error idk just confused

jovial solar
#

Try modifying the docker image add a print statement before the return

#

To print anything that is returned from the worker

bold tusk
#

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

jovial solar
#

Hmm I dont think so

#

But sure

bold tusk
#

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

jovial solar
#

Oh a node incorrect meaning the comfyui should errors out?