feat: build custom Facefusion image with NSFW filter patch baked in
This commit is contained in:
8
ai/Dockerfile
Normal file
8
ai/Dockerfile
Normal file
@@ -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"
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user