Spaces:
Sleeping
Sleeping
set 4 step
Browse files
app.py
CHANGED
|
@@ -25,7 +25,6 @@ examples = [
|
|
| 25 |
MODEL_OPTIONS = {
|
| 26 |
"Lightning": "SG161222/RealVisXL_V4.0_Lightning",
|
| 27 |
"Turbovision": "SG161222/RealVisXL_V3.0_Turbo",
|
| 28 |
-
|
| 29 |
}
|
| 30 |
|
| 31 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
|
@@ -114,29 +113,10 @@ def generate(
|
|
| 114 |
image_paths = [save_image(img) for img in images]
|
| 115 |
return image_paths, seed
|
| 116 |
|
| 117 |
-
#def load_predefined_images():
|
| 118 |
-
# predefined_images = [
|
| 119 |
-
# "assets/1.png",
|
| 120 |
-
# "assets/2.png",
|
| 121 |
-
# "assets/3.png",
|
| 122 |
-
# "assets/4.png",
|
| 123 |
-
# "assets/5.png",
|
| 124 |
-
# "assets/6.png",
|
| 125 |
-
# "assets/7.png",
|
| 126 |
-
# "assets/8.png",
|
| 127 |
-
# "assets/9.png",
|
| 128 |
-
# "assets/10.png",
|
| 129 |
-
# "assets/11.png",
|
| 130 |
-
# "assets/12.png",
|
| 131 |
-
# ]
|
| 132 |
-
# return predefined_images
|
| 133 |
-
|
| 134 |
-
|
| 135 |
with gr.Blocks(css=css) as demo:
|
| 136 |
gr.Markdown(
|
| 137 |
f"""
|
| 138 |
-
|
| 139 |
-
Models used in the playground [[Lightning]](https://huggingface.co/SG161222/RealVisXL_V4.0_Lightning), [[Realvision]](https://huggingface.co/) ,[[Turbo]](https://huggingface.co/SG161222/RealVisXL_V3.0_Turbo) for image generation. stable diffusion xl piped (sdxl) model HF. This is the demo space for generating images using the Stable Diffusion XL models, with multi different variants available. ⚠️ users are accountable for the content they generate and are responsible for ensuring it meets appropriate ethical standards.
|
| 140 |
"""
|
| 141 |
)
|
| 142 |
with gr.Row():
|
|
@@ -161,7 +141,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 161 |
num_images = gr.Slider(
|
| 162 |
label="Number of Images",
|
| 163 |
minimum=1,
|
| 164 |
-
maximum=
|
| 165 |
step=1,
|
| 166 |
value=1,
|
| 167 |
)
|
|
@@ -212,7 +192,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 212 |
minimum=1,
|
| 213 |
maximum=35,
|
| 214 |
step=1,
|
| 215 |
-
value=
|
| 216 |
)
|
| 217 |
|
| 218 |
gr.Examples(
|
|
|
|
| 25 |
MODEL_OPTIONS = {
|
| 26 |
"Lightning": "SG161222/RealVisXL_V4.0_Lightning",
|
| 27 |
"Turbovision": "SG161222/RealVisXL_V3.0_Turbo",
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
|
|
|
| 113 |
image_paths = [save_image(img) for img in images]
|
| 114 |
return image_paths, seed
|
| 115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
with gr.Blocks(css=css) as demo:
|
| 117 |
gr.Markdown(
|
| 118 |
f"""
|
| 119 |
+
Lightning on CPU
|
|
|
|
| 120 |
"""
|
| 121 |
)
|
| 122 |
with gr.Row():
|
|
|
|
| 141 |
num_images = gr.Slider(
|
| 142 |
label="Number of Images",
|
| 143 |
minimum=1,
|
| 144 |
+
maximum=2,
|
| 145 |
step=1,
|
| 146 |
value=1,
|
| 147 |
)
|
|
|
|
| 192 |
minimum=1,
|
| 193 |
maximum=35,
|
| 194 |
step=1,
|
| 195 |
+
value=4,
|
| 196 |
)
|
| 197 |
|
| 198 |
gr.Examples(
|