feat(complete): bake remaining Manager-installed deps + SAM2 pin - #45
Merged
Conversation
Audit of ComfyUI-Manager activity on every pod boot in production found ~14 packages it reinstalls each cold start. Adding the heavy/frequent ones to the image cuts cold-boot reinstall time substantially and removes Manager-installed packages as a source of behavioral drift between boots. New entries: # Additional dependencies (top group) huggingface-hub>=0.19 # Impact / Inspire / RMBG model downloads transformers>=4.30 # Impact CLIP-related nodes + transitively many peft # LoRA-using workflows typing_extensions # ubiquitous, was reinstalled every boot # Custom node optimizations group spandrel # ComfyUI upscaler runtime sentencepiece # Transformers tokenizers lark # Impact Pack wildcards engine ftfy # CLIP text cleanup protobuf>=3.20.2,<6.0.0 # match Manager's tight pin (onnx/transformers) # Impact Pack section git+https://github.com/facebookresearch/sam2@2b90b9f5ceec907a1c18123530e92e794ad901a4 # SAM2 functionality (currently reported as # unavailable in the running pod). Pinned to # the commit Manager installed yesterday so # the build stays reproducible. Skipped: transparent-background, opencv-python (non-headless), onnxruntime (CPU variant), hydra-core, omegaconf, iopath, decord — either lower frequency or only relevant to specific custom nodes that aren't in the audited workload. Can be added later if needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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
Follow-up to #44. Audit of
ComfyUI-Manageractivity on every pod boot in production showed ~14 packages it reinstalls on each cold start. This bakes the heavy/frequent ones into thecompleteimage and pins SAM2 from facebookresearch git so Manager has nothing left to reinstall for the audited workload.Audit method
On a fresh K8s pod, captured every
## ComfyUI-Manager: EXECUTE => [..., 'uv', 'pip', 'install', '<pkg>']line plus everyInstalled: + <pkg>==<ver>line from boot logs, deduped, cross-referenced against the currentextra-requirements.txt. Three categories:accelerate,diffusers,onnxruntime-gpu,opencv-python-headless,matplotlib,piexif,ultralytics,groundingdino-py,timm, plus the three from fix(complete): pre-install Impact/Subpack/Inspire deps to avoid load race #44 (segment-anything,dill,webcolors)transparent-background,opencv-python(non-headless conflicts with-headless),onnxruntimeCPU variant, and thehydra-core/omegaconf/iopath/decordchain. These are either lower-frequency or only relevant to specific custom nodes outside the audited workload. Easy to add later if needed.Change
Diff against
services/comfy/complete/extra-requirements.txt:huggingface-hub>=0.19transformers>=4.30pefttyping_extensionsspandrelsentencepiecelarkftfyprotobuf>=3.20.2,<6.0.02b90b9f5ceec907a1c18123530e92e794ad901a4— the exact commit Manager pulled yesterday — keeps the build reproducible.Test plan
complete-cudacleanly (no resolver conflicts betweentransformers,protobufpin,peft)## ComfyUI-Manager: EXECUTE => [..., 'install', ...]lines for the listed packages[Impact Pack] The SAM2 functionality is unavailablemessage disappearsStacked on
segment-anything,dill,webcolors🤖 Generated with Claude Code