mirror of
https://github.com/kodxana/madiator-docker-runpod.git
synced 2024-11-21 18:30:12 +01:00
Comfy UI - Add ability to pass custom arguments on start
This commit is contained in:
parent
656abb6292
commit
a833efc5d8
1 changed files with 15 additions and 1 deletions
|
@ -15,6 +15,14 @@ rsync_with_progress() {
|
||||||
stdbuf -i0 -o0 -e0 rsync -au --info=progress2 "$@" | stdbuf -i0 -o0 -e0 tr '\r' '\n' | stdbuf -i0 -o0 -e0 grep -oP '\d+%|\d+.\d+[mMgG]' | tqdm --bar-format='{l_bar}{bar}' --total=100 --unit='%' > /dev/null
|
stdbuf -i0 -o0 -e0 rsync -au --info=progress2 "$@" | stdbuf -i0 -o0 -e0 tr '\r' '\n' | stdbuf -i0 -o0 -e0 grep -oP '\d+%|\d+.\d+[mMgG]' | tqdm --bar-format='{l_bar}{bar}' --total=100 --unit='%' > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check for required commands
|
||||||
|
for cmd in stdbuf rsync tr grep tqdm; do
|
||||||
|
if ! command -v $cmd &> /dev/null; then
|
||||||
|
echo "$cmd could not be found, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
print_feedback "Starting ComfyUI setup..."
|
print_feedback "Starting ComfyUI setup..."
|
||||||
|
|
||||||
print_feedback "Syncing virtual environment..."
|
print_feedback "Syncing virtual environment..."
|
||||||
|
@ -36,4 +44,10 @@ cd /workspace/ComfyUI
|
||||||
|
|
||||||
print_feedback "Starting ComfyUI server..."
|
print_feedback "Starting ComfyUI server..."
|
||||||
print_feedback "ComfyUI will be available at http://0.0.0.0:3000"
|
print_feedback "ComfyUI will be available at http://0.0.0.0:3000"
|
||||||
exec /workspace/venv/bin/python main.py --listen --port 3000
|
|
||||||
|
# Check if CUSTOM_ARGS is set and not empty
|
||||||
|
if [ -n "$CUSTOM_ARGS" ]; then
|
||||||
|
exec /workspace/venv/bin/python main.py --listen --port 3000 $CUSTOM_ARGS
|
||||||
|
else
|
||||||
|
exec /workspace/venv/bin/python main.py --listen --port 3000
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue