From d314ec0aab57c0c5ba66dfaefea73347ea3c7883 Mon Sep 17 00:00:00 2001 From: Brian Gebel Date: Tue, 26 May 2026 22:00:41 -0700 Subject: [PATCH] fix(complete): bake remaining Manager-installed deps + SAM2 pin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- services/comfy/complete/extra-requirements.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/comfy/complete/extra-requirements.txt b/services/comfy/complete/extra-requirements.txt index b2f6d20..6c2f73d 100644 --- a/services/comfy/complete/extra-requirements.txt +++ b/services/comfy/complete/extra-requirements.txt @@ -4,11 +4,20 @@ accelerate>=1.10 onnxruntime-gpu>=1.22 diffusers>=0.34 +huggingface-hub>=0.19 +transformers>=4.30 +peft +typing_extensions # Custom node optimizations - frequently used dependencies baked in for faster startup opencv-python-headless>=4.12 scipy>=1.16 matplotlib>=3.10 +spandrel +sentencepiece +lark +ftfy +protobuf>=3.20.2,<6.0.0 # PuLID / IPAdapter facexlib>=0.3 @@ -19,6 +28,9 @@ piexif>=1.1 ultralytics>=8.3 segment-anything>=1.0 dill>=0.3 +# SAM2 from facebookresearch — pinned to the commit Manager installed in +# production (2026-05-26). Unpin only after testing a newer revision. +git+https://github.com/facebookresearch/sam2@2b90b9f5ceec907a1c18123530e92e794ad901a4 # ComfyUI Inspire Pack dependencies webcolors>=24.0