Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,9 @@ import gradio as gr
|
|
5 |
import spaces
|
6 |
|
7 |
|
8 |
-
|
|
|
|
|
9 |
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to("cuda")
|
10 |
|
11 |
@spaces.GPU
|
@@ -20,6 +22,15 @@ def generate_image(prompt, negative_prompt, num_inference_steps=30, guidance_sca
|
|
20 |
else:
|
21 |
model_id = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
text_encoder = CLIPTextModel.from_pretrained(
|
24 |
model_id,
|
25 |
subfolder="text_encoder"
|
@@ -40,7 +51,7 @@ def generate_image(prompt, negative_prompt, num_inference_steps=30, guidance_sca
|
|
40 |
if model == "Real6.0":
|
41 |
pipe.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
42 |
|
43 |
-
|
44 |
|
45 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
46 |
pipe.scheduler.config,
|
|
|
5 |
import spaces
|
6 |
|
7 |
|
8 |
+
lora1 = "OedoSoldier/detail-tweaker-lora"
|
9 |
+
lora2 = "Profakerr/blow_job"
|
10 |
+
lora3 = "Profakerr/caught_master"
|
11 |
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse").to("cuda")
|
12 |
|
13 |
@spaces.GPU
|
|
|
22 |
else:
|
23 |
model_id = "SG161222/Realistic_Vision_V6.0_B1_noVAE"
|
24 |
|
25 |
+
if "blowjob" in prompt.split():
|
26 |
+
prompt = prompt + "blowjob, hand on penis,naked male"
|
27 |
+
pipe.load_lora_weights(lora2)
|
28 |
+
|
29 |
+
if "caught" in prompt.split():
|
30 |
+
prompt = prompt + "busted, male pov, male masturbation, standing, hand on door, opening door"
|
31 |
+
pipe.load_lora_weights(lora3)
|
32 |
+
|
33 |
+
|
34 |
text_encoder = CLIPTextModel.from_pretrained(
|
35 |
model_id,
|
36 |
subfolder="text_encoder"
|
|
|
51 |
if model == "Real6.0":
|
52 |
pipe.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
53 |
|
54 |
+
|
55 |
|
56 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
57 |
pipe.scheduler.config,
|