Defter77 commited on
Commit
69656e5
·
verified ·
1 Parent(s): b8beec2

Upload start.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. start.sh +23 -12
start.sh CHANGED
@@ -16,6 +16,11 @@ mkdir -p /app/workflows
16
  mkdir -p /tmp/comfyui_user
17
  chmod 777 /tmp/comfyui_user
18
 
 
 
 
 
 
19
  # List the contents of key directories to debug
20
  echo "Checking for workflow files:"
21
  ls -la /app/workflows/ || echo "Workflow directory empty or not found"
@@ -23,19 +28,17 @@ ls -la /app/workflows/ || echo "Workflow directory empty or not found"
23
  echo "Checking for input images:"
24
  ls -la /app/ComfyUI/input/ || echo "Input directory empty or not found"
25
 
26
- # Download pose4.jpg image if it's missing or is an LFS pointer
27
- if [ ! -s "/app/ComfyUI/input/pose4.jpg" ] || grep -q "version https://git-lfs.github.com/spec/" /app/ComfyUI/input/pose4.jpg; then
28
- echo "Downloading pose4.jpg image..."
29
- # Directly download from Hugging Face repo
30
- curl -L -o /app/ComfyUI/input/pose4.jpg "https://huggingface.co/spaces/Defter77/Avatars/resolve/main/ComfyUI/input/pose4.jpg"
31
- fi
32
 
33
- # Download paita2.jpg image if it's missing or is an LFS pointer
34
- if [ ! -s "/app/ComfyUI/input/paita2.jpg" ] || grep -q "version https://git-lfs.github.com/spec/" /app/ComfyUI/input/paita2.jpg; then
35
- echo "Downloading paita2.jpg image..."
36
- # Directly download from Hugging Face repo
37
- curl -L -o /app/ComfyUI/input/paita2.jpg "https://huggingface.co/spaces/Defter77/Avatars/resolve/main/ComfyUI/input/paita2.jpg"
38
- fi
 
39
 
40
  # Start ComfyUI in the background with custom user directory
41
  cd /app/ComfyUI
@@ -47,6 +50,14 @@ COMFY_PID=$!
47
  echo "Waiting for ComfyUI server to initialize..."
48
  sleep 30 # Give it more time to start
49
 
 
 
 
 
 
 
 
 
50
  # Start the web interface
51
  cd /app
52
  echo "Starting Gradio interface..."
 
16
  mkdir -p /tmp/comfyui_user
17
  chmod 777 /tmp/comfyui_user
18
 
19
+ # Install ComfyUI requirements to make sure frontend package is installed
20
+ echo "Installing ComfyUI requirements..."
21
+ cd /app/ComfyUI
22
+ pip install -r requirements.txt
23
+
24
  # List the contents of key directories to debug
25
  echo "Checking for workflow files:"
26
  ls -la /app/workflows/ || echo "Workflow directory empty or not found"
 
28
  echo "Checking for input images:"
29
  ls -la /app/ComfyUI/input/ || echo "Input directory empty or not found"
30
 
31
+ # Download pose4.jpg image
32
+ echo "Downloading pose4.jpg image..."
33
+ curl -L -o /app/ComfyUI/input/pose4.jpg "https://huggingface.co/spaces/Defter77/Avatars/resolve/main/ComfyUI/input/pose4.jpg" || echo "Failed to download pose4.jpg"
 
 
 
34
 
35
+ # Download paita2.jpg image
36
+ echo "Downloading paita2.jpg image..."
37
+ curl -L -o /app/ComfyUI/input/paita2.jpg "https://huggingface.co/spaces/Defter77/Avatars/resolve/main/ComfyUI/input/paita2.jpg" || echo "Failed to download paita2.jpg"
38
+
39
+ # Verify images were downloaded
40
+ echo "Verifying downloaded images:"
41
+ ls -la /app/ComfyUI/input/
42
 
43
  # Start ComfyUI in the background with custom user directory
44
  cd /app/ComfyUI
 
50
  echo "Waiting for ComfyUI server to initialize..."
51
  sleep 30 # Give it more time to start
52
 
53
+ # Check if ComfyUI is running
54
+ if curl -s "http://localhost:8188/system_stats" > /dev/null; then
55
+ echo "ComfyUI server is up and running!"
56
+ else
57
+ echo "WARNING: ComfyUI server might not be running correctly."
58
+ echo "Proceeding anyway..."
59
+ fi
60
+
61
  # Start the web interface
62
  cd /app
63
  echo "Starting Gradio interface..."