fofr / cog-consistent-character

Create images of a given character in different poses
https://replicate.com/fofr/consistent-character
MIT License
459 stars 40 forks source link

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

Open arnage74 opened 2 weeks ago

arnage74 commented 2 weeks ago

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

fofr commented 2 weeks ago

Sure, I suggest running via the API to do that

andyg2 commented 1 week ago

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.