RunpodR
Runpod8mo ago
Barış

Questions About Running ComfyUI Serverless on RunPod

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!
Was this page helpful?