comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
55.23k stars 5.84k forks source link

Conditional Lora API (ComfyUI as Backend) #1082

Open rossaai opened 1 year ago

rossaai commented 1 year ago

Hello! I am trying to be able to insert one or more Loras using ComfyUI but it is not possible. Since it only accepts to change the values of the nodes and not the nodes themselves.

Wouldn't it be better if you could change the entire structure of the entire project with the API? Having these advantages:

  1. Have different implementations without the need to create new endpoints or ComfyUI instances: Giving the virtue of only deploying once comfortable ui to the backend and the new implementations are modified from the web page
  2. Flexibility: You can use, 1, 2, 3, n loras without having 5 meaningless implementations
  3. Replace Diffusers: Diffusers is used essentially when someone deploys their model in replicate or banandev, but creating a new implementation is re-modifying the entire codebase, testing, and a lot of time consumed, if only you could modify the JSON file in it, ComfyUI could become the backend par excellence for Stable Diffusion

Related Issues #930

fuami commented 1 year ago

The API requires that you submit an entire prompt, which is the entire structure.

Perhaps I'm misunderstanding the issue, but it already lets you do that as is seen in the API Example: https://github.com/comfyanonymous/ComfyUI/blob/master/script_examples/basic_api_example.py

seel-channel commented 1 year ago

Well... We want to load custom workflows by API without interacting UI so as to use it as server. Is it posible?

rossaai commented 1 year ago

952