Upload app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,6 @@ from diffusers import (
|
|
16 |
)
|
17 |
|
18 |
import time
|
19 |
-
import user_history
|
20 |
from illusion_style import css
|
21 |
|
22 |
BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE"
|
@@ -168,22 +167,22 @@ def inference(
|
|
168 |
print(f"Inference ended at {end_time_formatted}, taking {end_time-start_time}s")
|
169 |
|
170 |
# Save image + metadata
|
171 |
-
user_history.save_image(
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
)
|
187 |
|
188 |
return out_image["images"][0], gr.update(visible=True), gr.update(visible=True), my_seed
|
189 |
|
@@ -264,8 +263,6 @@ with gr.Blocks() as app:
|
|
264 |
with gr.Blocks(css=css) as app_with_history:
|
265 |
with gr.Tab("Demo"):
|
266 |
app.render()
|
267 |
-
with gr.Tab("Past generations"):
|
268 |
-
user_history.render()
|
269 |
|
270 |
app_with_history.queue(max_size=20,api_open=False )
|
271 |
|
|
|
16 |
)
|
17 |
|
18 |
import time
|
|
|
19 |
from illusion_style import css
|
20 |
|
21 |
BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE"
|
|
|
167 |
print(f"Inference ended at {end_time_formatted}, taking {end_time-start_time}s")
|
168 |
|
169 |
# Save image + metadata
|
170 |
+
# user_history.save_image(
|
171 |
+
# label=prompt,
|
172 |
+
# image=out_image["images"][0],
|
173 |
+
# profile=profile,
|
174 |
+
# metadata={
|
175 |
+
# "prompt": prompt,
|
176 |
+
# "negative_prompt": negative_prompt,
|
177 |
+
# "guidance_scale": guidance_scale,
|
178 |
+
# "controlnet_conditioning_scale": controlnet_conditioning_scale,
|
179 |
+
# "control_guidance_start": control_guidance_start,
|
180 |
+
# "control_guidance_end": control_guidance_end,
|
181 |
+
# "upscaler_strength": upscaler_strength,
|
182 |
+
# "seed": seed,
|
183 |
+
# "sampler": sampler,
|
184 |
+
# },
|
185 |
+
# )
|
186 |
|
187 |
return out_image["images"][0], gr.update(visible=True), gr.update(visible=True), my_seed
|
188 |
|
|
|
263 |
with gr.Blocks(css=css) as app_with_history:
|
264 |
with gr.Tab("Demo"):
|
265 |
app.render()
|
|
|
|
|
266 |
|
267 |
app_with_history.queue(max_size=20,api_open=False )
|
268 |
|