adbrasi commited on
Commit
0b00b26
·
verified ·
1 Parent(s): 0517d1c

Update ImageStudioTESTER.sh

Browse files
Files changed (1) hide show
  1. ImageStudioTESTER.sh +25 -3
ImageStudioTESTER.sh CHANGED
@@ -293,8 +293,30 @@ collect_requirements_and_install() {
293
  local reqtmp="$TMPDIR/_all_requirements.txt"
294
  : > "$reqtmp"
295
  if [ -d "$base" ]; then
296
- find "$base" -maxdepth 2 -type f -name "requirements.txt" -print0 | xargs -0 -I {} cat "{}" >> "$reqtmp" || true
297
- sort -u -o "$reqtmp" "$reqtmp"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  if [ -s "$reqtmp" ]; then
299
  log_info "Instalando requirements combinados dos custom nodes"
300
  python -m pip install ${PIP_FLAGS} -r "$reqtmp"
@@ -395,4 +417,4 @@ rm -rf "$TMPDIR"
395
  mkdir -p "$TMPDIR"
396
 
397
  cd "$COMFY_DIR"
398
- exec comfy --workspace "$COMFY_DIR" launch -- --listen "$COMFY_HOST" --preview-method latent2rgb --front-end-version Comfy-Org/ComfyUI_frontend@v1.28.8 --port "$COMFY_PORT"
 
293
  local reqtmp="$TMPDIR/_all_requirements.txt"
294
  : > "$reqtmp"
295
  if [ -d "$base" ]; then
296
+ python - "$base" "$reqtmp" <<'PY'
297
+ import sys
298
+ from pathlib import Path
299
+
300
+ base = Path(sys.argv[1])
301
+ reqtmp = Path(sys.argv[2])
302
+ entries = []
303
+
304
+ if base.exists():
305
+ for req in base.rglob("requirements.txt"):
306
+ try:
307
+ with req.open("r", encoding="utf-8", errors="ignore") as fh:
308
+ for line in fh:
309
+ line = line.strip()
310
+ if not line or line.startswith("#"):
311
+ continue
312
+ entries.append(line)
313
+ except Exception:
314
+ pass
315
+
316
+ entries = sorted(set(entries))
317
+ if entries:
318
+ reqtmp.write_text("\n".join(entries) + "\n", encoding="utf-8")
319
+ PY
320
  if [ -s "$reqtmp" ]; then
321
  log_info "Instalando requirements combinados dos custom nodes"
322
  python -m pip install ${PIP_FLAGS} -r "$reqtmp"
 
417
  mkdir -p "$TMPDIR"
418
 
419
  cd "$COMFY_DIR"
420
+ exec comfy --workspace "$COMFY_DIR" launch -- --listen "$COMFY_HOST" --preview-method latent2rgb --front-end-version Comfy-Org/ComfyUI_frontend@v1.28.8 --port "$COMFY_PORT"