|
import gradio as gr |
|
import random |
|
import os |
|
|
|
|
|
models = { |
|
"Face Projection": gr.load("models/Purz/face-projection"), |
|
"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") |
|
} |
|
|
|
def generate_image(text, num_inference_steps): |
|
result_images = {} |
|
for model_name, model in models.items(): |
|
result_images[model_name] = model(text) |
|
|
|
print(f"Inference Steps: {num_inference_steps}") |
|
|
|
return [result_images[model_name] for model_name in models] |
|
|
|
interface = gr.Interface( |
|
fn=generate_image, |
|
inputs=[ |
|
gr.Textbox(label="Type here your imagination:", placeholder="Type or click an example..."), |
|
gr.Slider(label="Number of inference steps", minimum=1, maximum=40, step=1, value=28), |
|
], |
|
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() |
|
|