DEV Community

Discussion on: How to Remove NSFW Filter in FaceFusion 3.3.2

Collapse
 
luchinco profile image
Luca • Edited

How can I disable the NSFW filter in FaceFusion 3.3.2 - Pinokio? Can you give me specific instructions? Thank you!
Reply luchinco@hotmail.com

Collapse
 
tak23 profile image
Tak23

With the 3.3.1 update, the previously known modification to content_analyser.py is no longer sufficient.
A modification has been added to core.py to detect file tampering and stop execution.
You can use AI to compare core.py with previous versions, find the modified parts, and take appropriate action.
There are also ways to respond without coding. Please check them out.
aiprovideos.com/facefusion-3-3-2-h...

Collapse
 
zachneverdies profile image
zachneverdies

In your content_analyser.py replace the following:

Replace

def analyse_frame(vision_frame : VisionFrame) -> bool:
    return detect_nsfw(vision_frame)
Enter fullscreen mode Exit fullscreen mode

With

def analyse_frame(vision_frame: VisionFrame) -> bool:
    return False
Enter fullscreen mode Exit fullscreen mode

Replace

def detect_nsfw(vision_frame : VisionFrame) -> bool:
    is_nsfw_1 = detect_with_nsfw_1(vision_frame)
    is_nsfw_2 = detect_with_nsfw_2(vision_frame)
    is_nsfw_3 = detect_with_nsfw_3(vision_frame)
    return is_nsfw_1 and is_nsfw_2 or is_nsfw_1 and is_nsfw_3 or is_nsfw_2 and is_nsfw_3
Enter fullscreen mode Exit fullscreen mode

With

def detect_nsfw(vision_frame: VisionFrame) -> bool:
    return False
Enter fullscreen mode Exit fullscreen mode

Next, in core.py, replace

is_valid = hash_helper.check_module_hash(content_analyser, 'content_analyser')
return all(module.pre_check() for module in common_modules) and is_valid
Enter fullscreen mode Exit fullscreen mode

With

is_valid = True
return all(module.pre_check() for module in common_modules) and is_valid
Enter fullscreen mode Exit fullscreen mode
Collapse
 
satyam_patel_22cac168eeb9 profile image
Satyam Patel

Can you please help with 3.4.1

Thread Thread
 
thesnake112 profile image
jek

everything is the same except replace the lines below:

return all(module.pre_check() for module in common_modules) and content_analyser_hash == '803b5ec7'

with:
is_valid = True
return all(module.pre_check() for module in common_modules) and is_valid