Support path prefixes in COMFY_LOCAL_URL

Aperta
#904 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, cli

Direzione di ricerca

Start by locating where COMFY_LOCAL_URL is parsed and where ComfyUI API request URLs are constructed. Verify the existing request tests or exercise representative API calls, then confirm that URLs with and without trailing path slashes preserve the prefix for endpoints such as /api/prompt and /system_stats.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Describe the solution you'd like
Make COMFY_LOCAL_URL accept a full URL including a path prefix, and preserve that prefix when constructing requests to the ComfyUI API. For example, setting COMFY_LOCAL_URL=http://host:8080/comfyui should cause all API calls (e.g., POST /api/prompt, GET /system_stats) to be sent to http://host:8080/comfyui/api/prompt and http://host:8080/comfyui/system_stats, respectively. Currently the path component is ignored, so requests go to the root. The path should be normalized (trailing slash optional) and correctly joined with the existing API endpoints.

Additional context
I tried using llama-swap to automatically switch between AI services, allowing multiple AI services to be started on demand and share a single GPU's VRAM. However, llama-swap exposes services under subdirectories, which makes them unusable from comfy-cli.

Users who like to reverse-proxy various services through nginx onto a single unified port may run into similar issues.

Lingua principale
Python
Stelle
1k
Fork
176
Merge medio
1g 11h
PR unite (30g)
87

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Comfy-Org/comfy-cli

Tutte le issue di Comfy-Org/comfy-cli

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.