Spaces:
Running
on
Zero
Running
on
Zero
Update app_quant_latent.py
Browse files- app_quant_latent.py +5 -6
app_quant_latent.py
CHANGED
|
@@ -20,10 +20,10 @@ from transformers import BitsAndBytesConfig as TransformersBitsAndBytesConfig
|
|
| 20 |
|
| 21 |
LOGS = ""
|
| 22 |
def log(msg):
|
| 23 |
-
global LOGS
|
| 24 |
-
print(msg)
|
| 25 |
-
LOGS += msg + "\n"
|
| 26 |
-
return msg
|
| 27 |
|
| 28 |
# ============================================================
|
| 29 |
|
|
@@ -264,7 +264,6 @@ for step, img in pipe(
|
|
| 264 |
callback=save_latents,
|
| 265 |
callback_steps=1
|
| 266 |
).iter():
|
| 267 |
-
# Decode current latent for live preview
|
| 268 |
current_latent = latent_history[-1] if latent_history else None
|
| 269 |
latent_images = [latent_to_image(l) for l in latent_history if l is not None]
|
| 270 |
yield img, latent_images, LOGS
|
|
@@ -277,7 +276,7 @@ for step, img in pipe(
|
|
| 277 |
# ============================================================
|
| 278 |
|
| 279 |
with gr.Blocks(title="Z-Image-Turbo Generator") as demo:
|
| 280 |
-
gr.Markdown("# **π Z-Image-Turbo β
|
| 281 |
|
| 282 |
```
|
| 283 |
with gr.Row():
|
|
|
|
| 20 |
|
| 21 |
LOGS = ""
|
| 22 |
def log(msg):
|
| 23 |
+
global LOGS
|
| 24 |
+
print(msg)
|
| 25 |
+
LOGS += msg + "\n"
|
| 26 |
+
return msg
|
| 27 |
|
| 28 |
# ============================================================
|
| 29 |
|
|
|
|
| 264 |
callback=save_latents,
|
| 265 |
callback_steps=1
|
| 266 |
).iter():
|
|
|
|
| 267 |
current_latent = latent_history[-1] if latent_history else None
|
| 268 |
latent_images = [latent_to_image(l) for l in latent_history if l is not None]
|
| 269 |
yield img, latent_images, LOGS
|
|
|
|
| 276 |
# ============================================================
|
| 277 |
|
| 278 |
with gr.Blocks(title="Z-Image-Turbo Generator") as demo:
|
| 279 |
+
gr.Markdown("# **π Z-Image-Turbo β Real-Time Latent & Transformer Logs**")
|
| 280 |
|
| 281 |
```
|
| 282 |
with gr.Row():
|