Spaces:
Running
on
Zero
Running
on
Zero
prithivMLmods
commited on
Commit
•
91bdf27
1
Parent(s):
e33bd11
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,6 @@ from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
|
|
12 |
DESCRIPTIONx = """
|
13 |
|
14 |
|
15 |
-
|
16 |
-
## TEXT-2-IMG SDXL
|
17 |
"""
|
18 |
|
19 |
css = '''
|
@@ -24,17 +22,17 @@ footer {
|
|
24 |
}
|
25 |
'''
|
26 |
|
27 |
-
examples = [
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
]
|
34 |
|
35 |
MODEL_OPTIONS = {
|
36 |
-
"
|
37 |
-
"
|
38 |
}
|
39 |
|
40 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
@@ -140,7 +138,7 @@ def load_predefined_images():
|
|
140 |
]
|
141 |
return predefined_images
|
142 |
|
143 |
-
with gr.Blocks(css=css
|
144 |
gr.Markdown(DESCRIPTIONx)
|
145 |
with gr.Row():
|
146 |
prompt = gr.Text(
|
@@ -219,11 +217,11 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
219 |
value=20,
|
220 |
)
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
)
|
227 |
|
228 |
use_negative_prompt.change(
|
229 |
fn=lambda x: gr.update(visible=x),
|
@@ -256,9 +254,9 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
256 |
api_name="run",
|
257 |
)
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
|
263 |
if __name__ == "__main__":
|
264 |
demo.queue(max_size=40).launch(show_api=False)
|
|
|
12 |
DESCRIPTIONx = """
|
13 |
|
14 |
|
|
|
|
|
15 |
"""
|
16 |
|
17 |
css = '''
|
|
|
22 |
}
|
23 |
'''
|
24 |
|
25 |
+
#examples = [
|
26 |
+
# "3d image, cute girl, in the style of Pixar --ar 1:2 --stylize 750, 4K resolution highlights, Sharp focus, octane render, ray tracing, Ultra-High-Definition, 8k, UHD, HDR, (Masterpiece:1.5), (best quality:1.5)",
|
27 |
+
# "Chocolate dripping from a donut against a yellow background, in the style of brocore, hyper-realistic oil --ar 2:3 --q 2 --s 750 --v 5 --ar 2:3 --q 2 --s 750 --v 5",
|
28 |
+
# "Illustration of A starry night camp in the mountains. Low-angle view, Minimal background, Geometric shapes theme, Pottery, Split-complementary colors, Bicolored light, UHD",
|
29 |
+
# "Man in brown leather jacket posing for camera, in the style of sleek and stylized, clockpunk, subtle shades, exacting precision, ferrania p30 --ar 67:101 --v 5",
|
30 |
+
# "Commercial photography, giant burger, white lighting, studio light, 8k octane rendering, high resolution photography, insanely detailed, fine details, on white isolated plain, 8k, commercial photography, stock photo, professional color grading, --v 4 --ar 9:16 "
|
31 |
+
#]
|
32 |
|
33 |
MODEL_OPTIONS = {
|
34 |
+
"Lightning": "SG161222/RealVisXL_V4.0_Lightning",
|
35 |
+
"Realvision": "SG161222/RealVisXL_V4.0",
|
36 |
}
|
37 |
|
38 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
|
|
138 |
]
|
139 |
return predefined_images
|
140 |
|
141 |
+
with gr.Blocks(css=css) as demo:
|
142 |
gr.Markdown(DESCRIPTIONx)
|
143 |
with gr.Row():
|
144 |
prompt = gr.Text(
|
|
|
217 |
value=20,
|
218 |
)
|
219 |
|
220 |
+
# gr.Examples(
|
221 |
+
# examples=examples,
|
222 |
+
# inputs=prompt,
|
223 |
+
# cache_examples=False
|
224 |
+
#)
|
225 |
|
226 |
use_negative_prompt.change(
|
227 |
fn=lambda x: gr.update(visible=x),
|
|
|
254 |
api_name="run",
|
255 |
)
|
256 |
|
257 |
+
# with gr.Column(scale=3):
|
258 |
+
# gr.Markdown("### Image Gallery")
|
259 |
+
# predefined_gallery = gr.Gallery(label="Image Gallery", columns=4, show_label=False, value=load_predefined_images())
|
260 |
|
261 |
if __name__ == "__main__":
|
262 |
demo.queue(max_size=40).launch(show_api=False)
|