Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,14 +40,16 @@ def pipeline_debug_info(pipe):
|
|
| 40 |
info = []
|
| 41 |
info.append("=== PIPELINE DEBUG INFO ===")
|
| 42 |
|
| 43 |
-
# Transformer info
|
| 44 |
try:
|
| 45 |
tr = pipe.transformer.config
|
| 46 |
info.append(f"Transformer Class: {pipe.transformer.__class__.__name__}")
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
info.append(f"
|
|
|
|
|
|
|
| 50 |
info.append(f"Patch size: {tr.get('patch_size')}")
|
|
|
|
| 51 |
info.append(f"Attention backend: {tr.get('attn_implementation')}")
|
| 52 |
except Exception as e:
|
| 53 |
info.append(f"Transformer diagnostics failed: {e}")
|
|
@@ -62,6 +64,7 @@ def pipeline_debug_info(pipe):
|
|
| 62 |
|
| 63 |
return "\n".join(info)
|
| 64 |
|
|
|
|
| 65 |
def latent_shape_info(h, w, pipe):
|
| 66 |
try:
|
| 67 |
c = pipe.vae.config.latent_channels
|
|
@@ -141,8 +144,8 @@ examples = [
|
|
| 141 |
["Portrait of a wise old wizard..."],
|
| 142 |
]
|
| 143 |
|
| 144 |
-
with gr.Blocks(title="Z-Image-Turbo
|
| 145 |
-
gr.Markdown("# 🎨 Z-Image-Turbo — Multi Image
|
| 146 |
|
| 147 |
with gr.Row():
|
| 148 |
with gr.Column(scale=1):
|
|
|
|
| 40 |
info = []
|
| 41 |
info.append("=== PIPELINE DEBUG INFO ===")
|
| 42 |
|
|
|
|
| 43 |
try:
|
| 44 |
tr = pipe.transformer.config
|
| 45 |
info.append(f"Transformer Class: {pipe.transformer.__class__.__name__}")
|
| 46 |
+
|
| 47 |
+
# Z-Image-Turbo correct keys
|
| 48 |
+
info.append(f"Hidden dim: {tr.get('hidden_dim')}")
|
| 49 |
+
info.append(f"Attention heads: {tr.get('num_heads')}")
|
| 50 |
+
info.append(f"Depth (layers): {tr.get('depth')}")
|
| 51 |
info.append(f"Patch size: {tr.get('patch_size')}")
|
| 52 |
+
info.append(f"MLP ratio: {tr.get('mlp_ratio')}")
|
| 53 |
info.append(f"Attention backend: {tr.get('attn_implementation')}")
|
| 54 |
except Exception as e:
|
| 55 |
info.append(f"Transformer diagnostics failed: {e}")
|
|
|
|
| 64 |
|
| 65 |
return "\n".join(info)
|
| 66 |
|
| 67 |
+
|
| 68 |
def latent_shape_info(h, w, pipe):
|
| 69 |
try:
|
| 70 |
c = pipe.vae.config.latent_channels
|
|
|
|
| 144 |
["Portrait of a wise old wizard..."],
|
| 145 |
]
|
| 146 |
|
| 147 |
+
with gr.Blocks(title="Z-Image-Turbo Multi Image Demo") as demo:
|
| 148 |
+
gr.Markdown("# 🎨 Z-Image-Turbo — Multi Image ")
|
| 149 |
|
| 150 |
with gr.Row():
|
| 151 |
with gr.Column(scale=1):
|