Files
docker-compose/ai/entrypoint.sh

17 lines
574 B
Bash
Raw Normal View History

#!/bin/sh
echo "Patching Facefusion to disable NSFW filter..."
# Patch content_analyser.py line 197 to always return False (content is safe)
sed -i '197s/.*/\treturn False # Patched: NSFW filter disabled/' /facefusion/facefusion/content_analyser.py
# Verify the patch was applied
if grep -q 'return False.*Patched' /facefusion/facefusion/content_analyser.py; then
echo "NSFW filter successfully disabled"
else
echo "ERROR: Patch failed!"
exit 1
fi
echo "Starting Facefusion..."
cd /facefusion && exec python -u facefusion.py run --listen 0.0.0.0 --port 7860