Saltar al contenido
Node packVerificadoExterno
Abrir fuente

comfyui-openai-api

Call LLM and VLM in a simple way using the OpenAI API standard within ComfyUI

Responsable@hekmonUnratedcalidad

Perfil del paquete

Estado
Verificado
Publicador
@hekmon
Fuente
GitHub

Léeme

ComfyUI OpenAI API

This repository contains ComfyUI nodes that integrates with the OpenAI API: it allows you to use language models and vision language models within your workflow.

It is KISS by design and intended for those who only wants basic capabilities without having to import massive projects like LLM party: only the chat completions endpoint (with vision support) is implemented as it should be enough for 99% of use cases.

Thanks to its simplicity the project has a low footprint: it only has 1 external dependency (3 in total) !

  • openai the official OpenAI API bindings for Python
  • numpy for computation but it is already a dependency of ComfyUI
  • Pillow also already used by ComfyUI for image processing

Usage

The default base_url parameter value targets the official OpenAI API endpoint by default but by changing it, you can also use this project with any OpenAI API compatible servers like Ollama, vLLM, TGI, etc...

Multiples images are supported as long as they are fed batched to the chat completion node.

If you want to customize the chat completion, you can chain options to modify the request. Most common options are available as predefined nodes but you can inject any key/value pair using the Extra body node.

Options nodes are available for:

  • seed
  • temperature
  • max_tokens
  • top_p
  • frequency_penalty
  • presence_penalty
  • developer_role
  • extra_body (for any other key/value pair)

Installation

ComfyUI Manager

Search for OpenAI API in the Custom Nodes Manager and install it.

Entry in the ComfyUI manager

Manually

On the github interface, click the green <> Code button and then Download ZIP. Extract the root folder of the zip file into your ComfyUI/custom_nodes directory.

Example

Example

Nodos de este paquete

10 nodos
  • OAIAPI_ChatCompletion
  • OAIAPI_Client
  • OAIAPI_DeveloperRole
  • OAIAPI_ExtraBody
  • OAIAPI_FrequencyPenalty
  • OAIAPI_MaxTokens
  • OAIAPI_PresencePenalty
  • OAIAPI_Seed
  • OAIAPI_Temperature
  • OAIAPI_TopP

Fuentes

3 fuentes
GitHubFuente
github.com/hekmon/comfyui-openai-api

Verificado 3 nov

GitHubFuenteVersión efb68c42291ae77df665423e02d6885a3f556bd1
github.com/hekmon/comfyui-openai-api

Verificado 12 oct

Extractos de fuentes

1 extracto

Source context: Repo hekmon/comfyui-openai-api