#Questions About Running ComfyUI Serverless on RunPod

27 messages · Page 1 of 1 (latest)

molten niche
#

I set up my ComfyUI project, ComfyUI Manager, custom nodes, and models on RunPod inside the /workspace directory of my network volume. When I temporarily deploy the volume and run python main.py --listen, I can access my ComfyUI workflow through the web on RunPod and generate images without any issues.

However, after spending a few days trying to figure it out, I still can’t get it working with the serverless API. I've gone through a bunch of docs and videos, but to be honest, I'm just more confused now. The workflow runs perfectly through the web but I could never get it to run through serverless.

Since everything is working fine on the web version, I feel like I'm really close to getting it working through the serverless API too. I'd really appreciate any help with this. I can also send over my files via DM if needed.

Some questions I have:

  • How can I use serverless API considering my workflow runs well on ComfyUI on RunPod (port 8188) when deployed to a pod? Do I need to generate a Docker image for this, or would it be enough if I used an existing Docker image and installed my models and custom nodes into relevant folders in /workspace? Because that’s how I ran it on port 8188 on ComfyUI. For your info, when trying to run it on serverless API, I exported API version of my ComfyUI workflow, used it on “workflow” part of my input but couldn’t make it work. This would also be a great video on RunPod’s YouTube channel imo.
  • On https://github.com/runpod-workers/worker-comfyui, under Quickstart, are the Docker images like runpod/worker-comfyui:3.6.0-base supposed to work? It only seems to work for me if they start with timpietruskyblibla/runpod-worker-comfy instead of runpod/worker-comfyui.
  • If the workflow already runs well on a deployed pod, why isn't there a simpler way to make it work with the serverless API? I get that "simple" is subjective but it feels like the process could be a lot smoother.
  • Even though I install the requirements.txt files inside workspace/ComfyUI/custom_nodes, every time I terminate and deploy a new pod, the packages I installed are gone. I thought anything installed under /workspace in the network volume would persist?

Thank you so much for your time!

mild thicketBOT
#

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

bright vine
#

last one is expected

#

maybe instead of going straight to serverless try to get it working with python in the command line

molten niche
# bright vine last one is expected

I guess so because from what I've seen, I think I need to build a Docker image or get a snapshot to be used in a Dockerfile to fix that. Wish it could be done in just /workspace directly without having to deal with that

molten niche
bright vine
#

what's your comfyUI port

#

when you access the comfyUI webUI?

#

and is your requirement generating images programmatically via serverless

#

or accessing the comfyUI webUI via serverless

molten niche
molten niche
bright vine
#

then shouldn't your main.py make a request to comfyUI to generate the images and return them to serverless?

molten niche
#

It should. I must be doing something stupid here because many people got it working, and some have the same issues I've faced

bright vine
#

can i come back about after a while

molten niche
#

Of course, please take your time, thank you for your help!

bright vine
molten niche
#

I’ll do it from scratch with the docs again and share the results here

bright vine
#

im back

molten niche
#

When I just deploy what's said in the docs (without ComfyUI stuff), it works. I made a minor suggestion on #🎤|general message. I'll try to update this based on my ComfyUI workflow, hope it goes well

teal magnet
#

It looks like we didn't publish the runpod image, I'll fix that today hopefully.

bright vine
#

does your workflow contan non-default models?

#

can you give us your workflow

last hazel
#

i'm looking into this and try to see what is broken with the workflow, been talking with @molten niche via dms

last hazel
bright vine
#

did you suceed?