Skip to content

compat: improve support for comfyui #1001

Description

@mostlygeek

ComfyUI does not have a good swap experience currently. The main reason is a websocket the frontend opens to the backend that is counted as an inflight request which currently prevents swapping. This is what I would like:

  • add a new model.websocket.ignore configuration parameter
  • add a new /comfyui endpoint for automatic configuration

The new model.websocket looks like this:

models:
  mycomfy: 
    # websocket: holds websocket options for the model 
    # optional  - default empty settings
    websocket: 
      # ignore: the websocket connection is ignored when considering a swap request
      # default - false, websockets are not ignored
      # when true, a websocket HTTP request will be ignored when consider a swap in or
      # swap out for the model.
      ignore: true   

When websocket.ignore = true a websocket connection will not be considered when swapping. This works for more than just comfyui such as for LLM inference that support websockets (see #754).

The new /comfyui endpoint is a wrapper over the above functionality with a few built in requirements for easy integration:

  • automatically looks for a model named "ls_comfyui".
  • forces model.websocket.ignore = true
  • any future comfyui workarounds will be applied via this endpoint

Ref: #1000

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions