31 wiersze
1.1 KiB
Bash
31 wiersze
1.1 KiB
Bash
#!/bin/bash
|
|
# stable-diffusion.cpp entrypoint
|
|
# Starts the optional GPU watchdog in background (best-effort, never fatal),
|
|
# then runs sd-cli with whatever arguments were passed to the container.
|
|
set -e
|
|
|
|
echo "=== stable-diffusion.cpp (Vulkan) ==="
|
|
echo
|
|
|
|
# Start the watchdog in the background if /dev/kmsg is accessible.
|
|
# It only prints warnings to stderr, it never interferes with sd-cli.
|
|
/app/watch-gpu.sh /dev/kmsg &
|
|
WATCH_PID=$!
|
|
disown "$WATCH_PID" 2>/dev/null || true
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
echo "No arguments passed. Example usage:"
|
|
echo
|
|
echo " --mode vid_gen \\"
|
|
echo " --diffusion-model /app/models/minimax_h3_fl2va_pruned-Q4_K.gguf \\"
|
|
echo " --llm /app/models/qwen3vl_32b_minimax_h3-Q4_K_M.gguf \\"
|
|
echo " --vae /app/models/minimax_h3_video_vae_fp16.safetensors \\"
|
|
echo " --audio-vae /app/models/minimax_h3_audio_vae_fp32.safetensors \\"
|
|
echo " --prompt \"...\" --width 640 --height 384 --video-frames 25 \\"
|
|
echo " --steps 4 --cfg-scale 1.0 --backend te=cpu --diffusion-fa \\"
|
|
echo " --output /app/output/out.webm"
|
|
exec /app/sd-cli --help
|
|
fi
|
|
|
|
exec /app/sd-cli "$@"
|