Comfy-Org / comfy-cli

Command Line Interface for Managing ComfyUI
https://docs.comfy.org/comfy-cli/getting-started
GNU General Public License v3.0
288 stars 48 forks source link

How to run a workflow programmatically just using comfy, without starting the comfyui server? #155

Closed PeterTF656 closed 2 months ago

PeterTF656 commented 3 months ago

Hey guys, I'm looking for a command that can run a workflow programmatically just using comfy, without starting the comfyui server. It was mentioned here in this issue

SayanoAI commented 3 months ago

this would be extremely useful for cloud serverless applications!

robinjhuang commented 2 months ago

You can run a workflow like this:

comfy launch --background
comfy run --workflow /path/to/api_workflow.json

You MUST start the comfy server to run anything. However you don't need to open the UI to run a workflow.

q351941406 commented 4 weeks ago

@robinjhuang How can I check the progress of the task?

robinjhuang commented 3 weeks ago

Not supported yet!

q351941406 commented 3 weeks ago

@robinjhuang You can add this feature because many tasks are very time-consuming, and we need to know the progress.

robinjhuang commented 3 weeks ago

We're a bit swamped at the moment, but can you write a PR? Probably the easiest thing is to stream the STDOUT of the comfy server to the cli STDOUT during the workflow run.

q351941406 commented 1 week ago

I'm not good enough