Defter77 commited on
Commit
415b456
·
verified ·
1 Parent(s): 3a580c7

Upload start.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. start.sh +21 -2
start.sh CHANGED
@@ -14,9 +14,10 @@ mkdir -p /tmp/comfyui_output
14
  mkdir -p /tmp/comfyui_temp
15
  mkdir -p /tmp/comfyui_user
16
  mkdir -p /tmp/workflows
 
17
 
18
  # Set proper permissions
19
- chmod -R 777 /tmp/comfyui_input /tmp/comfyui_output /tmp/comfyui_temp /tmp/comfyui_user /tmp/workflows
20
 
21
  # Download files from the dataset repository
22
  echo "Downloading images from dataset repository..."
@@ -31,14 +32,28 @@ echo "Verifying downloaded files:"
31
  ls -la /tmp/comfyui_input/
32
  ls -la /tmp/workflows/
33
 
 
 
 
 
 
 
 
 
34
  # Install additional Python packages
35
  echo "Installing required Python packages..."
 
36
  pip install comfyui-frontend-package comfyui-workflow-templates || echo "Package installation failed, continuing anyway"
37
 
38
  # Start ComfyUI in the background with custom directories
39
  cd /app/ComfyUI
40
  echo "Starting ComfyUI server..."
41
- python3 main.py --listen 0.0.0.0 --port 8188 --input-directory /tmp/comfyui_input --output-directory /tmp/comfyui_output --temp-directory /tmp/comfyui_temp --user-dir /tmp/comfyui_user &
 
 
 
 
 
42
  COMFY_PID=$!
43
 
44
  # Wait for ComfyUI to start
@@ -53,6 +68,10 @@ else
53
  echo "Proceeding anyway..."
54
  fi
55
 
 
 
 
 
56
  # Start the web interface with updated workflow path
57
  cd /app
58
  echo "Starting Gradio interface..."
 
14
  mkdir -p /tmp/comfyui_temp
15
  mkdir -p /tmp/comfyui_user
16
  mkdir -p /tmp/workflows
17
+ mkdir -p /tmp/comfyui_models
18
 
19
  # Set proper permissions
20
+ chmod -R 777 /tmp/comfyui_input /tmp/comfyui_output /tmp/comfyui_temp /tmp/comfyui_user /tmp/workflows /tmp/comfyui_models
21
 
22
  # Download files from the dataset repository
23
  echo "Downloading images from dataset repository..."
 
32
  ls -la /tmp/comfyui_input/
33
  ls -la /tmp/workflows/
34
 
35
+ # Run model downloader
36
+ echo "Downloading models..."
37
+ cd /app
38
+ python3 download_models.py
39
+
40
+ # Set environment variables
41
+ export PYTHONPATH="${PYTHONPATH}:/app/ComfyUI:/app/ComfyUI/custom_nodes"
42
+
43
  # Install additional Python packages
44
  echo "Installing required Python packages..."
45
+ pip install -e /app/ComfyUI/custom_nodes/PuLID || echo "Failed to install PuLID, continuing anyway"
46
  pip install comfyui-frontend-package comfyui-workflow-templates || echo "Package installation failed, continuing anyway"
47
 
48
  # Start ComfyUI in the background with custom directories
49
  cd /app/ComfyUI
50
  echo "Starting ComfyUI server..."
51
+ python3 main.py --listen 0.0.0.0 --port 8188 \
52
+ --input-directory /tmp/comfyui_input \
53
+ --output-directory /tmp/comfyui_output \
54
+ --temp-directory /tmp/comfyui_temp \
55
+ --user-dir /tmp/comfyui_user \
56
+ --models-directory /tmp/comfyui_models &
57
  COMFY_PID=$!
58
 
59
  # Wait for ComfyUI to start
 
68
  echo "Proceeding anyway..."
69
  fi
70
 
71
+ # List loaded custom nodes for debugging
72
+ echo "Custom nodes check:"
73
+ curl -s "http://localhost:8188/object_info" | grep -i "pulid" || echo "PuLID nodes not found"
74
+
75
  # Start the web interface with updated workflow path
76
  cd /app
77
  echo "Starting Gradio interface..."