Repository navigation
feat(comfyui): Model Console mode for ComfyUI apps, with installable model groups - #18
Merged
Merged
Conversation
llm-init comfyui downloads the models listed in a JSON app config into ComfyUI's model tree with resume and sha256 verification, re-fetches a model that disappears, probes ComfyUI's /system_stats, and serves /api/status plus a progress page. The LLM mode is untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hugging Face's CDN caps each connection (about 1.6 MiB/s on the test box) while six connections reached 9.5 MiB/s. Models of 64 MiB or more now download as COMFY_DOWNLOAD_CONNECTIONS ranges written in place, checkpointed so a restart resumes each range; an upstream that ignores Range falls back to the single-stream downloader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Over HTTP/2 the ranges multiplexed onto one TCP connection, so the CDN throttled them as a single stream (2.1 MiB/s with 8 ranges against 11 MiB/s for 6 separate connections on the same file). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppConfig gains optional groups (e.g. one per precision) on top of the
shared models. The installed groups live in COMFY_SELECTION_FILE, seeded
from COMFY_GROUPS on first start. PUT/DELETE /api/groups/{id} add or
remove a group: removal stops a running download and deletes the files
no other installed group uses, keeping at least one group. /api/status
reports groups; ready needs the shared models, one installed group and
ComfyUI. The console page lists the groups with download/delete.
Co-authored-by: Cursor <cursoragent@cursor.com>
…behind it Co-authored-by: Cursor <cursoragent@cursor.com>
| if err != nil { | ||
| return err | ||
| } | ||
| defer f.Close() |
Member
Author
There was a problem hiding this comment.
The success path syncs and closes the file explicitly and returns their errors (lines 138–142). This deferred Close only runs when the function returns early with an error; the .part file is then resumed from its .part.json checkpoint on the next pass, so an error from this close cannot lose data the caller relies on. Leaving it as is.
…up errors Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
llm-init comfyui): reads the app'sapp-config.json, downloads the models into the shared ComfyUI model folder with sha256/size checks, probes ComfyUI and serves/api/statusand a status page.HF_ENDPOINT.app-config.jsonmay listgroups(e.g. one per precision) next to the sharedmodels.COMFY_GROUPS("",allor a comma list) seeds the selection;COMFY_SELECTION_FILEkeeps it across restarts and wins over the env.PUT/DELETE /api/groups/{id}download or remove a group. Removing cancels its running download and deletes only files no other selected group needs; the last group cannot be removed (409)./api/statusgainsgroupswith state and progress;readymeans the shared models plus at least one selected group are done.Test plan
go test ./internal/comfyconsole/...(20 runs, 5 with-race), including group selection, validation, add/remove through the handler and cancelling a running downloaddocker.io/beclab/llm-init:comfyui-groups-20261115(sha256:b6a8914400cc4df0bab19970e5ca1da744d53423d88594621ce7f29137750b6f)