Support path prefixes in COMFY_LOCAL_URL

未关闭
#904 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
api, cli

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
1k
派生
176
平均合并
1 天 11 小时
30 天内合并 PR
87

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Comfy-Org/comfy-cli 的其他 Issue

查看 Comfy-Org/comfy-cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。