pseudotheos
commited on
Commit
·
0c421ed
1
Parent(s):
07123df
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import socket
|
3 |
import requests
|
4 |
from fastapi import FastAPI, File, UploadFile, Form
|
@@ -154,25 +155,7 @@ def inference(
|
|
154 |
end_time_formatted = time.strftime("%H:%M:%S", end_time_struct)
|
155 |
print(f"Inference ended at {end_time_formatted}, taking {end_time-start_time}s")
|
156 |
|
157 |
-
|
158 |
-
user_history.save_image(
|
159 |
-
label=prompt,
|
160 |
-
image=out_image["images"][0],
|
161 |
-
profile=profile,
|
162 |
-
metadata={
|
163 |
-
"prompt": prompt,
|
164 |
-
"negative_prompt": negative_prompt,
|
165 |
-
"guidance_scale": guidance_scale,
|
166 |
-
"controlnet_conditioning_scale": controlnet_conditioning_scale,
|
167 |
-
"control_guidance_start": control_guidance_start,
|
168 |
-
"control_guidance_end": control_guidance_end,
|
169 |
-
"upscaler_strength": upscaler_strength,
|
170 |
-
"seed": seed,
|
171 |
-
"sampler": sampler,
|
172 |
-
},
|
173 |
-
)
|
174 |
-
|
175 |
-
return out_image["images"][0], my_seed
|
176 |
|
177 |
import os
|
178 |
|
|
|
1 |
import os
|
2 |
+
import io
|
3 |
import socket
|
4 |
import requests
|
5 |
from fastapi import FastAPI, File, UploadFile, Form
|
|
|
155 |
end_time_formatted = time.strftime("%H:%M:%S", end_time_struct)
|
156 |
print(f"Inference ended at {end_time_formatted}, taking {end_time-start_time}s")
|
157 |
|
158 |
+
return out_image["images"][0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
import os
|
161 |
|