2.9 KiB
2.9 KiB
Install Notes
Real-world installation notes — useful when things don't go smoothly.
Target environment
- Ubuntu 22.04 + RTX 3090(s) + CUDA 12.6
- Python 3.13 inside ComfyUI's
.venv(uv-managed) - ComfyUI at
/mnt/modelall/ComfyUI/ HF_HOME=/mnt/modelall/hf_cache(root partition tight, must redirect)
Steps
cd /mnt/modelall/ComfyUI/custom_nodes
# Florence-2 + KJNodes — required upstream nodes
git clone https://github.com/kijai/ComfyUI-Florence2.git
git clone https://github.com/kijai/ComfyUI-KJNodes.git
# This node
git clone https://github.com/aadebuger/ComfyUI-EnglishAnnotator.git
# Install deps in ComfyUI venv
cd /mnt/modelall/ComfyUI && source .venv/bin/activate
export HF_HOME=/mnt/modelall/hf_cache # don't forget
uv pip install -r custom_nodes/ComfyUI-Florence2/requirements.txt
uv pip install -r custom_nodes/ComfyUI-KJNodes/requirements.txt
uv pip install -r custom_nodes/ComfyUI-EnglishAnnotator/requirements.txt
Model pre-download (optional but recommended)
Avoids waiting for the first workflow to download Florence-2 weights:
export HF_HOME=/mnt/modelall/hf_cache
uv pip install huggingface_hub
python -c "
from huggingface_hub import snapshot_download
snapshot_download('microsoft/Florence-2-base')
snapshot_download('microsoft/Florence-2-large')
"
Start ComfyUI
pkill -9 -f main.py; sleep 3
cd /mnt/modelall/ComfyUI && source .venv/bin/activate
export HF_HOME=/mnt/modelall/hf_cache
nohup python main.py --listen 0.0.0.0 --port 8188 > ~/comfy_start.log 2>&1 &
sleep 30
grep -iE "IMPORT FAILED|error" ~/comfy_start.log | head -10
Verify nodes loaded
curl -s http://10.8.0.12:8188/object_info | python3 -c "
import json, sys
d = json.load(sys.stdin)
for n in ['EnglishWordAnnotator','Florence2ModelLoader','Florence2Run']:
print(f' {n}: {\"✓\" if n in d else \"✗\"}')
"
All three should be ✓.
Known issues / fixes
| Symptom | Fix |
|---|---|
Florence2ModelLoader complains about transformers version |
uv pip install -U "transformers>=4.41" — Florence-2 needs newer, but stay below 5.0 if other nodes lock to 4.x (e.g. Qwen3TTS / Sonic at 4.57.3) |
flash_attn import error |
Set attention="sdpa" on Florence2Run |
| Labels render as empty boxes / squares | Fonts missing — sudo apt install fonts-dejavu-core |
| HF download fills root partition | export HF_HOME=/mnt/modelall/hf_cache before first run |
BBOX / STRING type mismatch between Florence-2 versions |
This node uses an AnyType matcher for bboxes / labels, so it tolerates flat lists, batch-wrapped lists, and dicts. Dump the workflow with --dump-workflow /tmp/wf.json and check history.outputs for the actual shape. |
No module named pip inside ComfyUI venv |
uv venvs don't ship pip — use uv pip install ..., not python -m pip |
Multiple top-level packages when packaging |
pyproject.toml already declares [tool.setuptools] packages = ["nodes"] |