start_comfy: apply core patches at launch, re-enable DynamicVRAM (real fix for #14573)
Browse files- start_comfy +22 -7
start_comfy
CHANGED
|
@@ -1,10 +1,25 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
# Free
|
| 3 |
-
#
|
| 4 |
kill $(lsof -t -i :7865) 2>/dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
cd /workspace/ComfyUI
|
| 6 |
-
|
| 7 |
-
# but comfy-aimdo/comfy-kitchen (DynamicVRAM) need cu130, which deadlocks the
|
| 8 |
-
# sampler at 0%. Disabling them is safe here (80GB H100 fits the models).
|
| 9 |
-
# Remove these once the image ships a cu130 torch build. See ./update_comfy.
|
| 10 |
-
python main.py --listen 0.0.0.0 --port 7865 --enable-manager --disable-dynamic-vram --disable-async-offload
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# Free port 7865, apply local ComfyUI core patches, then start ComfyUI on 7865
|
| 3 |
+
# (with the manager) — DynamicVRAM ENABLED.
|
| 4 |
kill $(lsof -t -i :7865) 2>/dev/null
|
| 5 |
+
|
| 6 |
+
# Apply local core patches (fixes the ComfyUI #14573 aimdo/DynamicVRAM sampler
|
| 7 |
+
# hang that upstream hasn't merged). Fetch the freshest apply_patches.sh from
|
| 8 |
+
# the HF repo (best-effort; keep the local copy if offline), then run it — this
|
| 9 |
+
# lets us fix core on an existing image without a rebuild. Applying the patch is
|
| 10 |
+
# what makes DynamicVRAM safe here, so no --disable-dynamic-vram is needed.
|
| 11 |
+
_p=/workspace/apply_patches.sh
|
| 12 |
+
_t=$(mktemp) 2>/dev/null
|
| 13 |
+
_tok="${HUGGING_FACE_ACCESS_TOKEN:-${HF_TOKEN:-}}"
|
| 14 |
+
_auth=(); [ -n "$_tok" ] && _auth=(-H "Authorization: Bearer $_tok")
|
| 15 |
+
if curl -fsSL --connect-timeout 10 --max-time 30 "${_auth[@]}" \
|
| 16 |
+
"https://huggingface.co/aleph65/ComfyUI/raw/main/apply_patches.sh" -o "$_t" 2>/dev/null \
|
| 17 |
+
&& head -c2 "$_t" | grep -q '#!'; then
|
| 18 |
+
chmod +x "$_t"; mv "$_t" "$_p"
|
| 19 |
+
else
|
| 20 |
+
rm -f "$_t"
|
| 21 |
+
fi
|
| 22 |
+
[ -f "$_p" ] && bash "$_p"
|
| 23 |
+
|
| 24 |
cd /workspace/ComfyUI
|
| 25 |
+
python main.py --listen 0.0.0.0 --port 7865 --enable-manager
|
|
|
|
|
|
|
|
|
|
|
|