2025-11-13 03:52:21 +00:00
|
|
|
#!/bin/sh
|
2025-11-13 04:23:38 +00:00
|
|
|
echo "Patching Facefusion to disable NSFW filter..."
|
2025-11-13 04:02:30 +00:00
|
|
|
|
2025-11-13 04:28:50 +00:00
|
|
|
# Patch content_analyser.py line 197 to always return False (content is safe)
|
2025-11-13 04:23:38 +00:00
|
|
|
sed -i '197s/.*/\treturn False # Patched: NSFW filter disabled/' /facefusion/facefusion/content_analyser.py
|
2025-11-13 04:02:30 +00:00
|
|
|
|
2025-11-13 04:28:50 +00:00
|
|
|
# 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..."
|
2025-11-13 05:52:13 +01:00
|
|
|
cd /facefusion && exec python -u facefusion.py run
|