File size: 1,755 Bytes
17e58be
190c4ad
 
77efc8c
96ad892
0389d06
190c4ad
 
 
0389d06
77efc8c
3a1878a
 
 
 
 
 
 
 
 
 
 
 
190c4ad
 
3a1878a
190c4ad
 
 
0389d06
 
 
3a1878a
 
0389d06
190c4ad
25cb0a6
0389d06
 
146f57d
190c4ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import gradio as gr
import random
import os


models = {
    "Flux LoRA Uncensored": gr.load("models/prashanth970/flux-lora-uncensored"),
    "NSFW TrioHMH Flux": gr.load("models/DiegoJR1973/NSFW-TrioHMH-Flux"),
    "NSFW Master": gr.load("models/pimpilikipilapi1/NSFW_master")
}


default_negative_prompt = (
    "Extra limbs, Extra fingers or toes, Disfigured face, Distorted hands, Mutated body parts, "
    "Missing limbs, Asymmetrical features, Blurry face, Poor anatomy, Incorrect proportions, Crooked eyes, "
    "Deformed hands or fingers, Double face, Unrealistic skin texture, Overly smooth skin, Poor lighting, "
    "Cartoonish appearance, Plastic look, Grainy, Unnatural expressions, Crossed eyes, Mutated clothing, "
    "Artifacts, Uncanny valley, Doll-like features, Bad symmetry, Uneven skin tones, Extra teeth, "
    "Unrealistic hair texture, Dark shadows on face, Overexposed face, Cluttered background, Text, watermark, "
    "or signature, Over-processed"
)

def generate_image(text, negative_prompt):
    result_images = {}
    for model_name, model in models.items():
        result_images[model_name] = model(text, negative_prompt=negative_prompt) 
    
    return [result_images[model_name] for model_name in models]

interface = gr.Interface(
    fn=generate_image,
    inputs=[
        gr.Textbox(label="Type your prompt here:", placeholder="Describe what you want..."),
        gr.Textbox(label="Negative prompt:", value=default_negative_prompt),
    ],
    outputs=[gr.Image(label=model_name) for model_name in models],
    theme="NoCrypt/miku",
    description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
)

interface.launch()