Spaces:
Running
on
Zero
Running
on
Zero
Update app_lora.py
Browse files- app_lora.py +2 -12
app_lora.py
CHANGED
|
@@ -765,7 +765,7 @@ def generate_image(prompt, height, width, steps, seed, guidance_scale=0.0):
|
|
| 765 |
|
| 766 |
|
| 767 |
# Debug pipe info
|
| 768 |
-
|
| 769 |
|
| 770 |
generator = torch.Generator().manual_seed(int(seed))
|
| 771 |
|
|
@@ -783,17 +783,7 @@ def generate_image(prompt, height, width, steps, seed, guidance_scale=0.0):
|
|
| 783 |
)
|
| 784 |
|
| 785 |
# Correct latent diagnostics (Z-Image uses VAE + Transformer)
|
| 786 |
-
|
| 787 |
-
log(f"VAE latent channels: {pipe.vae.config.latent_channels}")
|
| 788 |
-
log(f"VAE scaling factor: {pipe.vae.config.scaling_factor}")
|
| 789 |
-
log(f"Transformer latent size: {pipe.transformer.config.sample_size}")
|
| 790 |
-
log(latent_shape_info(height, width, pipe))
|
| 791 |
-
|
| 792 |
-
except Exception as e:
|
| 793 |
-
log(f"Latent diagnostics error: {e}")
|
| 794 |
-
|
| 795 |
-
log("Pipeline finished.")
|
| 796 |
-
log("Returning images...")
|
| 797 |
|
| 798 |
return result.images, seed, log_buffer.getvalue()
|
| 799 |
|
|
|
|
| 765 |
|
| 766 |
|
| 767 |
# Debug pipe info
|
| 768 |
+
|
| 769 |
|
| 770 |
generator = torch.Generator().manual_seed(int(seed))
|
| 771 |
|
|
|
|
| 783 |
)
|
| 784 |
|
| 785 |
# Correct latent diagnostics (Z-Image uses VAE + Transformer)
|
| 786 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 787 |
|
| 788 |
return result.images, seed, log_buffer.getvalue()
|
| 789 |
|