fix(complete): bake ComfyUI-Lora-Manager deps to prevent startup crash loop - #48
Merged
Conversation
…INDEX arg ComfyUI's requirements.txt has bare `torch / torchaudio / torchvision` lines with no version pins or wheel URLs. The core Dockerfile used \`--extra-index-url https://download.pytorch.org/whl/cu128\` when installing those, but \`--extra-index-url\` is **additive**: pip picks the highest version found across PyPI + the extra index. When PyPI ships a newer torch than the cu128 index (which happens regularly — e.g. torch 2.12.0 landed on PyPI built for cu130 while the cu128 index still topped out at 2.11.0+cu128), pip picks the PyPI build for torch and the cu128 build for torchaudio (no newer torchaudio on PyPI). Result: torch compiled against cu130 + torchaudio compiled against cu128 → runtime crash on import: RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions. PyTorch has CUDA version 13.0 whereas TorchAudio has CUDA version 12.8. The current production image (built before torch 2.12.0 hit PyPI) works by luck; the next clean rebuild — with or without recent extra-requirements changes — would have failed regardless. ## Change Two-stage install in the core layer: 1. \`pip install --index-url https://download.pytorch.org/whl/${TORCH_INDEX} torch torchaudio torchvision\` — replaces PyPI for this command so all three are pulled from the same wheel index with a consistent CUDA ABI. 2. \`pip install -r /app/ComfyUI/requirements.txt\` then \`manager_requirements.txt\` — runs normally; torch family is already satisfied and pip skips re-resolution. Also adds \`ARG TORCH_INDEX=cu128\` parameterised via docker-bake.hcl: - \`core-cuda\` → \`TORCH_INDEX=cu128\` - \`core-cpu\` → \`TORCH_INDEX=cpu\` Adding a future cu130 variant becomes a single bake-target addition with \`args = { TORCH_INDEX = "cu130" }\`, no Dockerfile changes needed. ## Related Supersedes the closed #46 (which targeted the wrong layer with --extra-index-url cu130 in \`complete\` — would have masked the symptom while leaving the index-priority bug unfixed and also unnecessarily locking the image to cu130). Verified by local \`docker buildx bake complete-cuda\` rebuild: produces matching cu128 wheels for all torch-family packages; ComfyUI imports torch/torchaudio without the CUDA-mismatch error. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…h loop lora-manager is runtime-installed onto the custom_nodes volume; after a self-update it began importing natsort, which isn't in the image venv. Every fresh container boot then dies on ModuleNotFoundError before the server binds — observed as CrashLoopBackOff on harmony talos-2101. Bake all of lora-manager's requirements that aren't already provided by core/extra deps, same pattern as the Impact/Subpack/Inspire fix (#44). Co-Authored-By: Claude Fable 5 <noreply@anthropic.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
comfyui-lora-manageris runtime-installed onto thecustom_nodesvolume (not baked into the image). After a self-update it began importingnatsort, which doesn't exist in the image venv — every fresh boot now dies onModuleNotFoundErrorbefore the server binds. Observed as a hard CrashLoopBackOff on harmony's ComfyUI deployment (talos-2101, 2026-06-12).Same failure class and same fix pattern as #44 (Impact/Subpack/Inspire pre-install).
Changes
Adds lora-manager's requirements not already provided by core or extra deps to
services/comfy/complete/extra-requirements.txt:natsort,olefile,toml,GitPython,aiosqlite,beautifulsoup4,platformdirs. (Its remaining deps — aiohttp, jinja2, safetensors, piexif, Pillow, numpy, pyyaml — are already in the venv.)After merge
CI pushes the new
completeimage; harmony's deployment digest gets bumped to it.🤖 Generated with Claude Code