20
Browse files
app.py
CHANGED
|
@@ -229,6 +229,10 @@ def infer(
|
|
| 229 |
has_null_indicator=has_null_indicator,
|
| 230 |
)
|
| 231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
if save_gpu_memory:
|
| 233 |
image_unprocessed = batch_decode(_z, decode)
|
| 234 |
else:
|
|
@@ -244,7 +248,7 @@ def infer(
|
|
| 244 |
last_image = pil_images[-1]
|
| 245 |
|
| 246 |
gif_buffer = io.BytesIO()
|
| 247 |
-
pil_images[0].save(gif_buffer, format="GIF", save_all=True, append_images=pil_images[1:], duration=
|
| 248 |
gif_buffer.seek(0)
|
| 249 |
gif_bytes = gif_buffer.read()
|
| 250 |
|
|
|
|
| 229 |
has_null_indicator=has_null_indicator,
|
| 230 |
)
|
| 231 |
|
| 232 |
+
print("+++++"*20)
|
| 233 |
+
print("Now, save images")
|
| 234 |
+
print("+++++"*20)
|
| 235 |
+
|
| 236 |
if save_gpu_memory:
|
| 237 |
image_unprocessed = batch_decode(_z, decode)
|
| 238 |
else:
|
|
|
|
| 248 |
last_image = pil_images[-1]
|
| 249 |
|
| 250 |
gif_buffer = io.BytesIO()
|
| 251 |
+
pil_images[0].save(gif_buffer, format="GIF", save_all=True, append_images=pil_images[1:], duration=100, loop=0)
|
| 252 |
gif_buffer.seek(0)
|
| 253 |
gif_bytes = gif_buffer.read()
|
| 254 |
|