RisuAI icon indicating copy to clipboard operation
RisuAI copied to clipboard

[feature request] add comfyui endpoint for stable diffusion

Open Yvonne-Aizawa opened this issue 1 year ago • 0 comments

I would like to get an option to use comfyui as a endpoint for stable diffusion. With comfyUI you can have finer control over image generation. A while ago i wrote a rust script to create an image here.

Basicly it would send a request to /promt with a json file in its body. (this also has a client id in it) you will get a promtid as a response back After that you need to listen on a websocket on /ws?clientId=(client id from the json file) and listen for a success call with your promtid {"type": "executed", "data": {"node": "9", "output": {"images": [{"filename": "image.png", "subfolder": "", "type": "output"}]}, "prompt_id": "8f750f48-ff85-49a5-98ca-32373e6f8ffd"}} finally you will get the image by going to /view?filename={}&subfolder={}&type={}

i hope this is considered since i think comfyui is a very nice tool to generate images. I also would love the options to choose your own comfyworkflow. In the rust script i made it a handlebar template

"client_id": "{{client_id}}" a user could provide their json file like this and {{client_id}} would be filled in automaticly. same can be done for promts/lora's and maybe even custom data

Yvonne-Aizawa avatar May 04 '24 14:05 Yvonne-Aizawa