comfy-cli icon indicating copy to clipboard operation
comfy-cli copied to clipboard

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

Open PeterTF656 opened this issue 1 year ago • 1 comments

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

PeterTF656 avatar Aug 16 '24 06:08 PeterTF656

this would be extremely useful for cloud serverless applications!

SayanoAI avatar Aug 16 '24 16:08 SayanoAI

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.

robinjhuang avatar Aug 29 '24 22:08 robinjhuang

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

q351941406 avatar Oct 28 '24 10:10 q351941406

Not supported yet!

robinjhuang avatar Oct 29 '24 03:10 robinjhuang

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

q351941406 avatar Oct 30 '24 21:10 q351941406

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.

robinjhuang avatar Oct 30 '24 21:10 robinjhuang

I'm not good enough

q351941406 avatar Nov 13 '24 22:11 q351941406