Spaces:
Running
on
Zero
Running
on
Zero
aifeifei798
commited on
Commit
•
a62e14b
1
Parent(s):
3b986ef
Update app.py
Browse files
app.py
CHANGED
@@ -58,18 +58,17 @@ def infer(prompt, quality_select, styles_Radio, FooocusExpansion_select, seed=42
|
|
58 |
seed = random.randint(0, MAX_SEED)
|
59 |
|
60 |
generator = torch.Generator().manual_seed(seed)
|
61 |
-
if prompt:
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
prompt = "the photo is kpop bikini 1girl"
|
73 |
image = pipe(
|
74 |
prompt = "",
|
75 |
prompt_2 = prompt,
|
|
|
58 |
seed = random.randint(0, MAX_SEED)
|
59 |
|
60 |
generator = torch.Generator().manual_seed(seed)
|
61 |
+
if not prompt:
|
62 |
+
prompt = "the photo is a 18 yo jpop girl is looking absolutely adorable and gorgeous, with a playful and mischievous grin, her eyes twinkling with joy."
|
63 |
+
if quality_select:
|
64 |
+
prompt += ", masterpiece, best quality, very aesthetic, absurdres"
|
65 |
+
if styles_Radio:
|
66 |
+
for style_name in styles_Radio:
|
67 |
+
for style in config.style_list:
|
68 |
+
if style["name"] == style_name:
|
69 |
+
prompt += style["prompt"].replace("{prompt}", "the ")
|
70 |
+
if FooocusExpansion_select:
|
71 |
+
prompt = expansion(prompt, seed)
|
|
|
72 |
image = pipe(
|
73 |
prompt = "",
|
74 |
prompt_2 = prompt,
|