diff --git a/ai/Dockerfile b/ai/Dockerfile new file mode 100644 index 0000000..de21d0c --- /dev/null +++ b/ai/Dockerfile @@ -0,0 +1,8 @@ +FROM facefusion/facefusion:3.5.0-cpu + +# Patch content_analyser.py to disable NSFW filter +RUN sed -i '197s/.*/\treturn False # Patched: NSFW filter disabled/' /facefusion/facefusion/content_analyser.py && \ + grep -q 'return False.*Patched' /facefusion/facefusion/content_analyser.py || (echo "ERROR: Patch failed!" && exit 1) + +# Verify patch was applied +RUN echo "NSFW filter patch successfully applied to image" diff --git a/ai/compose.yaml b/ai/compose.yaml index 959fd82..48802cb 100644 --- a/ai/compose.yaml +++ b/ai/compose.yaml @@ -158,7 +158,10 @@ services: # Facefusion - AI face swapping and enhancement facefusion: - image: ${AI_FACEFUSION_IMAGE:-facefusion/facefusion:3.5.0-cpu} + build: + context: . + dockerfile: Dockerfile + image: facefusion-patched:3.5.0-cpu container_name: ${AI_COMPOSE_PROJECT_NAME}_facefusion restart: unless-stopped command: ['python', '-u', 'facefusion.py', 'run']