Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It often says NSFW content, can I disable this check? #8

Open
arnage74 opened this issue Jun 12, 2024 · 2 comments
Open

It often says NSFW content, can I disable this check? #8

arnage74 opened this issue Jun 12, 2024 · 2 comments

Comments

@arnage74
Copy link

I want to run this model for NSFW content. Is it possible to run it locally without this check?

@fofr
Copy link
Owner

fofr commented Jun 12, 2024

Sure, I suggest running via the API to do that

@andyg2
Copy link

andyg2 commented Jun 23, 2024

You could also try editing predict.py

def predict
From

disable_safety_checker: bool = Input(
    description="Disable safety checker for generated images.", default=False
),

To

disable_safety_checker: bool = Input(
    description="Disable safety checker for generated images.", default=True
),

def update_workflow
From

negative_prompt["text"] = (
    f"(nsfw:2), nipple, nude, naked, {kwargs['negative_prompt']}, lowres, two people, child, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, multiple view, reference sheet, mutated, poorly drawn, mutation, deformed, ugly, bad proportions, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, amateur drawing, odd eyes, uneven eyes, unnatural face, uneven nostrils, crooked mouth, bad teeth, crooked teeth, gross, ugly, very long body, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn eyes"
)

To

negative_prompt["text"] = (
    f"{kwargs['negative_prompt']}, lowres, two people, child, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, multiple view, reference sheet, mutated, poorly drawn, mutation, deformed, ugly, bad proportions, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, amateur drawing, odd eyes, uneven eyes, unnatural face, uneven nostrils, crooked mouth, bad teeth, crooked teeth, gross, ugly, very long body, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn eyes"
)

Untested. There may be something easier or other checks in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants