diff --git a/ai/entrypoint.sh b/ai/entrypoint.sh index 4326b63..1cc3d9b 100755 --- a/ai/entrypoint.sh +++ b/ai/entrypoint.sh @@ -1,13 +1,15 @@ #!/bin/sh -# Wait for models to be downloaded, then delete NSFW models once +echo "Starting Facefusion..." +# Start Facefusion in the background python -u facefusion.py run --config-path /config/facefusion-config.ini & -PID=0 +FACEFUSION_PID=$! -# Wait 60 seconds for initial model downloads -sleep 60 +echo "Waiting 90 seconds for model downloads..." +sleep 90 -# Delete NSFW models -rm -f /facefusion/.assets/models/nsfw_*.onnx /facefusion/.assets/models/nsfw_*.hash +echo "Deleting NSFW models..." +rm -vf /facefusion/.assets/models/nsfw_*.onnx /facefusion/.assets/models/nsfw_*.hash +echo "NSFW models deleted. Facefusion is running." # Wait for the main process -wait +wait $FACEFUSION_PID