Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/requirements/requirements.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ func scanLinesWithContinuations(data []byte, atEOF bool) (advance int, token []b
continue
}

if len(line) == 0 {
continue
}

// Not a continuation, return the accumulated line
return i + 1, line, nil
}
Expand Down
176 changes: 176 additions & 0 deletions pkg/requirements/requirements_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,182 @@ cycler==0.12.1 \
}, requirements)
}

func TestComfyUIRequirements(t *testing.T) {
srcDir := t.TempDir()
reqFile := path.Join(srcDir, "requirements.txt")
err := os.WriteFile(reqFile, []byte(`torch
torchvision
torchaudio
torchsde
einops
transformers>=4.49.0
tokenizers>=0.13.3
sentencepiece
safetensors>=0.3.0
aiohttp
accelerate>=1.1.1
pyyaml
Pillow
scipy
tqdm
psutil
spandrel
soundfile
kornia>=0.7.1
websocket-client==1.6.3
diffusers>=0.31.0
av>=14.1.0
comfyui-frontend-package==1.17.11
comfyui-workflow-templates==0.1.3

# ComfyUI-AdvancedLivePortrait
dill

# Inspire
webcolors

# fix for pydantic issues in cog
# https://github.com/replicate/cog/issues/1623
albumentations==1.4.3

# was-node-suite-comfyui
# https://github.com/WASasquatch/was-node-suite-comfyui/blob/main/requirements.txt
cmake
imageio
joblib
matplotlib
pilgram
scikit-learn
rembg

# ComfyUI_essentials
numba

# ComfyUI_FizzNodes
pandas
numexpr

# comfyui-reactor-node
insightface
onnx

# ComfyUI-Impact-Pack
segment-anything
piexif

# ComfyUI-Impact-Subpack
ultralytics!=8.0.177

# comfyui_segment_anything
timm

# comfyui_controlnet_aux
# https://github.com/Fannovel16/comfyui_controlnet_aux/blob/main/requirements.txt
importlib_metadata
opencv-python-headless>=4.0.1.24
filelock
numpy
scikit-image
python-dateutil
mediapipe
svglib
fvcore
yapf
omegaconf
ftfy
addict
yacs
trimesh[easy]

# ComfyUI-KJNodes
librosa
color-matcher

# PuLID
facexlib

# SUPIR
open-clip-torch>=2.24.0
pytorch-lightning>=2.2.1

# For train.py and custom loras
huggingface_hub[hf-transfer]

# ComfyUI-segment-anything-2
iopath`), 0o644)
require.NoError(t, err)

requirements, err := ReadRequirements(reqFile)
require.NoError(t, err)
require.Equal(t, []string{
"torch",
"torchvision",
"torchaudio",
"torchsde",
"einops",
"transformers>=4.49.0",
"tokenizers>=0.13.3",
"sentencepiece",
"safetensors>=0.3.0",
"aiohttp",
"accelerate>=1.1.1",
"pyyaml",
"Pillow",
"scipy",
"tqdm",
"psutil",
"spandrel",
"soundfile",
"kornia>=0.7.1",
"websocket-client==1.6.3",
"diffusers>=0.31.0",
"av>=14.1.0",
"comfyui-frontend-package==1.17.11",
"comfyui-workflow-templates==0.1.3",
"dill",
"webcolors",
"albumentations==1.4.3",
"cmake",
"imageio",
"joblib",
"matplotlib",
"pilgram",
"scikit-learn",
"rembg",
"numba",
"pandas",
"numexpr",
"insightface",
"onnx",
"segment-anything",
"piexif",
"ultralytics!=8.0.177",
"timm",
"importlib_metadata",
"opencv-python-headless>=4.0.1.24",
"filelock",
"numpy",
"scikit-image",
"python-dateutil",
"mediapipe",
"svglib",
"fvcore",
"yapf",
"omegaconf",
"ftfy",
"addict",
"yacs",
"trimesh[easy]",
"librosa",
"color-matcher",
"facexlib",
"open-clip-torch>=2.24.0",
"pytorch-lightning>=2.2.1",
"huggingface_hub[hf-transfer]",
"iopath",
}, requirements)
}

func checkRequirements(t *testing.T, expected []string, actual []string) {
t.Helper()
for n, expectLine := range expected {
Expand Down